绿色风 发表于 2010-10-30 16:09:56

MYsql的ODBC驱动 3.51版

在找mysql.au3相关的东西,发现要装下面的 MYsql的ODBC驱动,在管网,英文的不说还要注册后才能下载。好麻烦!!
http://dev.mysql.com/downloads/connector/odbc/3.51.html

现下载下来了,方便大家有这需要的朋友吧。。。

绿色风 发表于 2010-10-30 16:13:58

本帖最后由 绿色风 于 2011-10-31 03:11 编辑

下面的是在mysql.au3中将里面的英文说明复制出来后在 GooGLe 中译出来的。

对比一下。

希望有这方面的操作实例的朋友,给我和大家一份这方面的实例教程。
对 MYsql的,连接,查找,修改,写入,删除,移动......等操作。

谢谢。。。。      函数名称:_MySQLConnect
      函数名称:_Query
      函数名称:_MySQLEnd
      函数名称:_AddRecord
      函数名称:_DeleteRecord
      函数名称:_CreateTable()
      函数名称:_CreateColumn
      函数名称:_DropCol()
      函数名称:_DropTbl()
      函数名称:_CountRecords()
      函数名称:_CountTables
      函数名称:_GetColNames
      函数名称:_GetTblNames
      函数名称:_GetColVals
      函数名称:_GetColCount
      函数名称:_GetColType



#cs


        Function Name:    _MySQLConnect
      函数名称:_MySQLConnect

        Description:      Initiate a connection to a MySQL database.
      说明:启动一个连接到MySQL数据库。

        Parameter(s):   $username - The username to connect to the database with.
      参数(补):$用户名 - 连接到的用户名与数据库。

        $password - The password to connect to the database with. $Database - Database to connect to.
      $密码 - 密码与连接到数据库。 $数据库 - 要连接的数据库。

        $server - The server your database is on.
      $服务器 - 数据库服务器上。

        $driver (optional) the ODBC driver to use (default is "{MySQL ODBC 3.51 Driver}"
      $驱动器(可选)的ODBC驱动程序使用(默认为“{}的MySQL的ODBC驱动程序3.51”

        Requirement(s):   Autoit 3 with COM support
      要求(补):AutoIt的3 COM支持

        Return Value(s):On success returns the connection object for subsequent functions. On failure returns 0 and sets @error
      返回值(S):成功返回后续函数连接对象。失败时返回0,并设置@错误

        @Error = 1
      @错误= 1

        Error opening connection
      错误打开连接

        @Error = 2
      @错误= 2

        MySQL ODBC Driver not installed.
      MySQL的ODBC驱动程序没有安装。

        Author(s):      cdkid
      作者(s):cdkid

        说明:需要安装MYsql的ODBC驱动,下载地址:
      说明:需要安装Mysql的ODBC的驱动的,下载地址:

        http://dev.mysql.com/downloads/connector/odbc/3.51.html
      http://dev.mysql.com/downloads/connector/odbc/3.51.html

#ce


#cs


        Function name: _Query
      函数名称:_Query

        Description:   Send a query to the database
      说明:发送一个查询到数据库

        Parameter(s):$oConnectionObj - As returned by _MySQLConnect. $query - The query to execute
      参数(补):$ oConnectionObj - 由_MySQLConnect返回。 $查询 - 查询,以执行

        Return Value(s):On success returns the query result. On failure returns 0 and sets @error to 1
      返回值(S):成功返回查询结果。失败时返回0,并设置@错误1

        Requirement(s):Autoit3 with COM support
      要求(补):Autoit3与COM支持

        Author(s):      cdid
      作者(s):cdid

#ce


#cs


        Function name: _MySQLEnd
      函数名称:_MySQLEnd

        Description:      Closes the database connection (see notes)
      说明:关闭数据库连接(见说明!)

        Parameter(s):   $oConnectionObj - The connection object as returned by _MySQLConnect()
      参数(补):$ oConnectionObj - 连接对象返回_MySQLConnect()

        Requirement(s):Autoit 3 with COM support
      要求(补):AutoIt的3 COM支持

        Return Value(s):On success returns 1. On failure returns 0 and sets @error to 1
      返回值(S):成功返回1。失败时返回0,并设置@错误1

        Author(s):         cdkid
      作者(s):cdkid

#ce


#cs


        Function name: _AddRecord
      函数名称:_AddRecord

        Description:   Adds a record to the specified table
      说明:添加一条记录到指定的表

        Note(s):         to add to multiple columns use an array with one blank element at the end as the $sColumn, and $value parameter
      注(补):添加到多个列使用与$ sColumn结束与一个空白的元素的数组,$值参数

        Parameter(s):   $oConnectionObj - As returned by _MySQL Connect. $sTable - The table to put the record in
      参数(补):$ oConnectionObj - 由_MySQL返回连接。 $稳定 - 该表将记录在

                      $row - The row to put the record in. $value - The value to put into the row
      $行 - 该行把英寸$值的记录 - 该值放入行

                                        $vValue - OPTIONAL default will be default for the column (will not work with array, see notes)
      $架构与时代价值 - 可选预设将列的默认(不会与数组,见注)

        Requirement(s): Autoit 3 with COM support
      要求(补):AutoIt的3 COM支持

        Return value(s): On success returns 1. If the connectionobj is not an object returns 0 and sets @error to 2. If there is any other error returns 0 and sets @error to 1.
      返回值(S):成功返回1。如果connectionobj不是一个对象返回0,并设置@误差为2。如果有任何其他错误返回0,并设置@误差为1。

        Author(s): cdkid, burthold (fixed a problem with extra commas)
      作者(s):cdkid,burthold(修正了一个额外的逗号的问题)

#ce


#cs


        Function name: _DeleteRecord
      函数名称:_DeleteRecord

        Description:   Deletes a record from the specified table
      说明:删除一条记录从指定的表

        Parameter(s):$oConnectionObj - As returned by _MySQLConnect. $sTable - The table to delete from.
      参数(补):$ oConnectionObj - 由_MySQLConnect返回。 $稳定 - 该表删除。

        $sColumn - The column to check value (see the example in the next post) $vRecordVal -
      $ sColumn - 列检查值(参见下一个帖子的例子)$ vRecordVal -

        The value to check in $sColumn (see example).
      检查的价值在$ sColumn(见示例)。

        $iLimit (optional) - the max number of record to delete if multiple match the criteria (default 1)
      $ iLimit(可选) - 最大数量的记录中删除,如果多个匹配的标准(默认1)

        Return Value(s): On success returns 1. If there $oConnectionObj is not an object returns 0 and sets @error to 1. If there are any other errors returns 0 and sets @error to 2
      返回值(S):成功返回1。如果有$ oConnectionObj不是一个对象返回0,并设置@错误1。如果有任何其他错误返回0,并设置@误差为2

        Requirement(s): Autoit 3 with COM support
      要求(补):AutoIt的3 COM支持

#ce


#cs


        Function name: _CreateTable()
      函数名称:_CreateTable()

        Description: Creates a table
      说明:创建一个表

        Parameters: $oConnectionObj - as returned by _MySQLConnect, $sTbl - The name of the table to create, $sPrimeKey - The name of the
      参数:$ oConnectionObj - 由_MySQLConnect返回,$ sTbl - 表的名称来创建,$ sPrimeKey - 该名称

        primary key column. $keytype - The datatype of the primary key (default is integer), $sNotNull - "yes" = must be filled out whenever
      主键列。 $ keytype - 以主键的数据类型(默认为整数),$ sNotNull - “是”=时必须填写

        a record is added "no" does not need to be filled out ("yes" default). $keyautoinc - "yes" = Auto incrememnts "no" = does not.
      记录是添加了“不”并不需要填写(“是”默认)。 $ keyautoinc - “是”=自动incrememnts“不”=没有。

        $sType - The table type (default is InnoDB)
      $ sType - 表类型(默认为InnoDB的)

        Requirements: Autoit V3 with COM support
      要求:AutoIt的V3的支持与COM

        Return value(s): on success returns 1 on failure sets @error to 1 and returns 0
      返回值(S):成功返回1,失败设置@误差为1,返回0

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function Name: _CreateColumn
      函数名称:_CreateColumn

        Description: Creates a column in the given table
      说明:创建一个在给定的表列

        Requirements: AutoitV3 with COM support
      要求:AutoitV3与COM支持

        Parameters: $oConnectionObj - as returned by _MySQLConnect. $sTable - the name of the table to add the column to.
      参数:$ oConnectionObj - 由_MySQLConnect返回。 $稳定 - 表的名称来添加列。

        $sAllowNull - if 'yes' then does not add 'NOT NULL' to the SQL statement (default 'yes') $sDataType - The data type of the column
      $ sAllowNull - 如果'是',那么不加'非空'的SQL语句(缺省为'是')$ sDataType - 列的数据类型

        default('VARCHAR(45)').                $sAutoInc - if 'yes' adds 'AUTO_INCREMENT' to the MySQL Statement (for use with Integer types)
      默认('为varchar(45)')。 $ sAutoInc - 如果'是'补充'的AUTO_INCREMENT'到MySQL声明(与整数类型的使用)

        default('no').                $sUnsigned - if 'yes' adds 'UNSIGNED' to the MySQL statement. default('no') $vDefault - the default value of the column
      默认('不')。 $ sUnsigned - 如果'是'添加'无符号'到MySQL语句。默认('不')$ vDefault - 列的默认值

        default('')
      默认('')

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function Name: _DropCol()
      函数名称:_DropCol()

        Description: Delete a column from the given table
      说明:删除一列从给定的表

        Requirements: AutoitV3 with COM support
      要求:AutoitV3与COM支持

        Parameters: $oConnectionObj - As returned by _MySQLConnect(). $sTable - The name of the table to delete the column from
      参数:$ oConnectionObj - 由_MySQLConnect()返回。 $稳定 - 该表的名称删除列从

        $sColumn - THe name of the column to delete
      $ sColumn - 列的名称删除

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function Name: _DropTbl()
      函数名称:_DropTbl()

        Description: Deletes a table from the database
      说明:从数据库中删除表

        Requirements: AutoitV3 with COM support
      要求:AutoitV3与COM支持

        Parameters: $oConnectionObj - As returned by _MySQLConnect. $sTable - The name of the table to delete
      参数:$ oConnectionObj - 由_MySQLConnect返回。 $稳定 - 该表的名称删除

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function name: _CountRecords()
      函数名称:_CountRecords()

        Description: Get the number of records in the specified column
      说明:获取指定列中的记录数

        Parameters: $oConnectionObj - As returned by _MySQLConnect. $sTable - The name of the table that the column is in
      参数:$ oConnectionObj - 由_MySQLConnect返回。 $稳定 - 表的名称列在

        $value - If not = "" then it is put in the select statement in the WHERE clause (default "")
      $值 - 如果不=“”那么它放在WHERE子句(SELECT语句中的默认“”)

        Return value(s): On success returns the number of records. On failure sets @error to 1 and returns 0
      返回值(S):成功返回的记录数。如果失败设置@误差为1,返回0

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function name: _CountTables
      函数名称:_CountTables

        Description: Counts the number of tables in the database
      描述:计数的表在数据库中数

        Parameter(s): $oConnectionObj - As returned by _MySQLConnect
      参数(补):$ oConnectionObj - 由_MySQLConnect返回

        Return value(s): if error - returns 0 and sets @error to 1. on success returns the number of tables in the database
      返回值(S):如果错误 - 返回0,并设置@误差为1。成功返回数字在数据库中的表

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function name: _GetColNames
      函数名称:_GetColNames

        Description: Get's the names of all columns in a specified table
      描述:获取在一个指定表的所有列的名称

        Parameters: $oConnectionObj - As returned by _MySQLConnect. $sTable - The name of the table to get the column names from
      参数:$ oConnectionObj - 由_MySQLConnect返回。 $稳定 - 该表的名称以获得列名从

        Return values: On success returns an array where $array is the number of elements in the array and all the rest are column names.
      返回值:成功返回一个数组,其中数组$ 是数组中的元素个数和所有其余的列名。

        On failure returns 0 and sets @error to 1
      失败时返回0,并设置@错误1

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function name: _GetTblNames
      函数名称:_GetTblNames

        Description: Gets the names of all tables in the database
      说明:获取数据库中所有表的名称

        Parameters: $oConnectionObj - As returned by _MySQLConnect
      参数:$ oConnectionObj - 由_MySQLConnect返回

        Return value(s): On success returns an array where $array is the number of tables and $array is the nth table's name
      返回值(S):成功返回一个数组,其中数组$ 是数组的表的数量和$ 是第n个表的名称

        on failure - returns 0 and sets @error to 1
      失败 - 返回0和1套@错误

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function name: _GetColVals
      函数名称:_GetColVals

        Description: Gets all of the values of a specified column in a specified table
      说明:获取指定表中的指定列的所有值

        Parameters: $oConnectionObj - As returned by _MySQLConnect(), $sTable - the table that the column is in
      参数:$ oConnectionObj - 作为返回_MySQLConnect(),$稳定 - 表中的列

        $sColumn - the column to get values from.
      $ sColumn - 列得到的值是从。

        Return value(s): On success returns an array where $array is the number of values and $array is the Nth value
      返回值(S):成功返回一个数组,其中数组$ 是数组的值的数量和$ 是第N个值

        On failure sets @error to 1 and returns 0
      如果失败设置@误差为1,返回0

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function name: _GetColCount
      函数名称:_GetColCount

        Description: Gets the number of columns in the specified table
      说明:获取指定表中的列数

        Parameters: $oConnectionObj - As returned by _MySQLConnect(). $sTable - the table to count the columns in
      参数:$ oConnectionObj - 由_MySQLConnect()返回。 $稳定 - 表中的列数

        Return Value(s): On success returns the number of columns in the table. On failure returns -1 and sets @error to 1
      返回值(S):成功返回表中的列数。如果失败返回-1并设置错误1 @

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function name: _GetColType
      函数名称:_GetColType

        Description: Gets the DATA TYPE of the specified column
      说明:获取指定列的数据类型

        Parameters: $oConnectionObj - As returned by _MySQLConnect(). $sTable - the table that the column is in. $sColumn - the column
      参数:$ oConnectionObj - 由_MySQLConnect()返回。 $稳定 - 该列所在$ sColumn表 - 列

        to retrieve the data type from.
      以检索数据类型。

        Return value(s): On success returns the data type of the column. On failure returns 0 and sets @error to 1
      返回值(S):成功返回列的数据类型。失败时返回0,并设置@错误1

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function: _GetDBNames
      功能:_GetDBNames

        Description: Get a count and list of all databases on current server.
      描述:获取当前服务器上所有数据库的数量和名单。

        Parameters: $oConObj - As returned by _MySQLConnect
      参数:$ oConObj - 由_MySQLConnect返回

        Return Value(s): Success - An array where $array is the number of databases and $array is the nth database name.
      返回值(S):成功 - 一个数组,其中$数组是数组的数据库和$ 的数量是n次数据库的名称。

        Failure - -1 and sets @error to 1
      失败 - -1并设置错误1 @

        Author: cdkid
      作者:cdkid

#ce


#cs


        Function: _ChangeCon
      功能:_ChangeCon

        Description: Change your connection string
      说明:更改连接字符串

        Parameters:
      参数:

        $oConnectionObj
      $ oConnectionObj

        As returned by _MySQLConnect
      由于返回_MySQLConnect

        $username
      $的用户名

        OPTIONAL: the new username to use
      选购:新使用的用户名

        If omitted, the same username will be used.
      如果省略,将使用相同的用户名。

        $password
      $密码

        OPTIONAL: the new password to use
      选购:新的密码才能使用

        If omitted, the same password will be used.
      如果省略,将使用相同的密码。

        $database
      $数据库

        OPTIONAL: the new database to connect to
      选购:新的数据库连接

        If omitted, the same database will be used.
      如果省略,将使用相同的数据库。

        $driver
      $司机

        OPTIONAL: the new driver to use
      选购:要使用新的驱动程序

        If omitted, the MySQL ODBC 3.51 DRIVER will be used.
      如果省略,则MySQL的ODBC 3.51驱动程序将被使用。

        $server
      $服务器

        OPTIONAL: the new server to connect to
      选购:新的服务器连接到

        If omitted, the same server will be used.
      如果省略,将使用相同的服务器。

        Return Value:
      返回值:

        On success, a new connection object for use with subsequent functions.
      如果成功,为以后的使用功能和新的连接对象。

        On failure, -1 and sets @error to 1
      如果失败,-1并设置错误1 @

        Author: cdkid
      作者:cdkid

#ce


chenronting 发表于 2010-10-30 18:38:41

哈。 这么好的东西。 还是要感谢一下楼主的。加油~

zuiyi 发表于 2010-10-31 12:25:51

{:face (84):}好東西,支持樓主
页: [1]
查看完整版本: MYsql的ODBC驱动 3.51版