odbc_autocommit
开关自动改动功能。
语法: int odbc_autocommit(int connection_id, int [onoff]);
返回值: 整数
函数种类: 数据库功能
内容说明: 本函数用来打开或关闭自动更新 (auto-commit) 功能。参数 connection_id 为 odbc 链接的 id 值。参数 onoff 可省略,表打开或关闭自动改动功能,默认值为 on,欲关闭则设 off。返回值为目前的自动更新状态,若打开自动更新功能则返回 true;若关闭自动更新功能则返回 false。
参考: odbc_commit() odbc_rollback()
odbc_binmode
配置二进位资料处理方式。
语法: int odbc_binmode(int result_id, int mode);
返回值: 整数
函数种类: 数据库功能
内容说明: 本函数用来配置二进位资料返回时的处理方式。受到本函数影响的资料类型有 binary、varbinary 及 longvarbinary。参数 result_id 为返回的 id 值,若设为 0,则程序将配置一个新的 id 值。参数 mode 为配置的二进位处理方式,有下列的值
odbc_binmode_passthru 返回二进位资料
odbc_binmode_return 转成十六进位返回
odbc_binmode_convert 转成字符串资料返回
注意: 若使用 odbc_fetch_into(),odbc_binmode_passthru 会导至返回字符串值都是空的 (empty)。而返回资料最大治募默认大小为 4096 位组,若要返回更多的资料需使用 odbc_longreadlen()。
参考: odbc_fetch_into() odbc_longreadlen()
odbc_close
关闭 odbc 链接。
语法: void odbc_close(int connection_id);
返回值: 无
函数种类: 数据库功能
内容说明: 本函数用来关闭与 odbc 数据库之间的链接。参数 connection_id 为 odbc 链接代号 id 值。若正在执行 transactions 则无法关闭链接。
odbc_close_all
关闭所有
| 对此文章发表了评论 |
