zoukankan      html  css  js  c++  java
  • flex 连接mysql

    转载自(http://hi.baidu.com/jsbrml/item/b578c75d4beb0f424fff2070)

    <?xml version="1.0" encoding="utf-8"?>   <mx:WindowedApplication    
            xmlns:mx="http://www.adobe.com/2006/mxml"    
            xmlns:assql="com.maclema.mysql.mxml.*"    
            layout="absolute">           <mx:script>   
            <![CDATA[                           import mx.controls.Alert;   
                            import com.maclema.mysql.events.MySqlErrorEvent;   
                    import com.maclema.util.ResultsUtil;   
                    private function handleConnected(e:Event):void {   
                            service.send("SELECT * FROM employees2 LIMIT 10");   
                    }   
                    private function handleError(e:MySqlErrorEvent):void {   
                            Alert.show(e.text);                   }   
            ]]>           </mx:script>   
            <assql:MySqlService id="service"   
                    hostname="localhost"                    username="root"   
                    password=""                   database="assql-test"   
                    autoConnect="true"   
                    connect="handleConnected(event)"    
                    sqlError="handleError(event)" />   
            <mx:DataGrid id="grid" left="10" right="10" top="10" bottom="10"   
                    dataProvider="{service.lastResult}"   
                    columns="{ResultsUtil.getDataGridColumns(service.lastResultSet)}" />   
    </mx:WindowedApplication>

    注意要下载引用asSQL-Beta2.8.swc哦!  

  • 相关阅读:
    继承与派生
    函数,迭代器,生成器
    面向对象
    函数
    模块与包
    python面试题(转自https://www.cnblogs.com/wupeiqi/p/9078770.html)
    python学习大纲目录(转自alex博客https://www.cnblogs.com/alex3714/)
    Mysql(基础篇)
    初识HTML和CSS2
    初识前端作业1
  • 原文地址:https://www.cnblogs.com/arcserver/p/2776760.html
Copyright © 2011-2022 走看看