理论上,使用标准的 odbc 会比使用本函数好。当然也可以使用本函数,只是较不鼓励 solid 函数库。
solid_close: 关闭 solid 链接。
solid_connect: 链接至 solid 数据库。
solid_exec: 执行 sql 指令。
solid_fetchrow: 取得返回一列。
solid_fieldname: 取得字段名称。
solid_fieldnum: 取得字段数目。
solid_freeresult: 释出返回资料的内存。
solid_numfields: 取得字段数目。
solid_numrows: 取得返回列数目。
solid_result: 取得返回资料。
solid_close
关闭 solid 链接。
语法: void solid_close(int connection_id);
返回值: 无
函数种类: 数据库功能
内容说明: 本函数用来关闭与 solid 数据库之间的链接。参数 connection_id 为 solid 链接代号 id 值。若正在执行 transactions 则无法关闭链接。
solid_connect
链接至 solid 数据库。
语法: int solid_connect(string dsn, string user, string password, int [cursor_type]);
返回值: 整数
函数种类: 数据库功能
内容说明: 本函数用来链接到 solid 数据库,返回值为链接的代号 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 就可以避开了。
| 对此文章发表了评论 |
