xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:assql="com.maclema.mysql.mxml.*"
minWidth="955" minHeight="600">
hostname="localhost"
username="root"
password="root"
database="jpetstore"
autoConnect="true"
port="3306"
connect="handleConnected(event)"
sqlError="handleError(event)" />
import mx.controls.Alert;
import com.maclema.mysql.events.MySqlErrorEvent;
import com.maclema.util.ResultsUtil;
private function handleConnected(e:Event):void {
Alert.show("连接成功")
service.send("SELECT * FROM user");
}
private function handleError(e:MySqlErrorEvent):void {
Alert.show(e.text);
}
]]>
dataProvider="{service.lastResult}"
columns="{ResultsUtil.getDataGridColumns(service.lastResultSet)}" />
分享到:
2012-03-06 11:50
浏览 1455
评论