语法: void odbc_close_all(void);
返回值: 无
函数种类: 数据库功能
内容说明: 本函数用来关闭与 odbc 数据库之间所有的链接。和 odbc_close() 一样,若正在执行 transactions 则无法关闭链接。使用本函数不需要使用任何参数。
odbc_commit
改动 odbc 数据库。
语法: int odbc_commit(int connection_id);
返回值: 整数
函数种类: 数据库功能
内容说明: 本函数用来改动 (commit) odbc 数据库。参数 connection_id 为 odbc 链接的 id 值。若有配置 odbc_autocommit() 成自动改动数据库时,则不需使用本函数。
odbc_connect
链接至 odbc 数据库。
语法: int odbc_connect(string dsn, string user, string password, int [cursor_type]);
返回值: 整数
函数种类: 数据库功能
内容说明: 本函数用来链接到 odbc 数据库,返回值为链接的代号 id 值。参数 dsn 为资料来源名称 (data sources name)。参数 user 及 password 分别为链接的帐号及密码。参数 cursor_type 通常省略,其值有 sql_cur_use_if_needed、sql_cur_use_odbc、sql_cur_use_driver 及 sql_cur_default 等四种。当使用复杂的资料存取时可能会有类似 "cannot open a cursor on a stored procedure that has anything other than a single select statement in it" 的错误信息字符串,此时若将参数 cursor_type 的值设为 sql_cur_use_odbc 就可以避开了。
参考: odbc_pconnect()
odbc_cursor
取得游标名。
语法: string odbc_cursor(int result_id);
返回值: 字符串
函数种类: 数据库功能
内容说明: 本函数用来取得打开的 odbc 数据库游标 (cursor)。参数 connection_id 为 odbc 链接代号 id 值。返回值为游标的名称字符串。
odbc_do
| 对此文章发表了评论 |
