资源描述:
《odbcapi常用函数诠释》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、ODBCAPI常用函数诠释>>教育资源库 以下为ODBCAPI的常用十四个函数,先列出在Pop; integercbdsnmax,refintegerpcbdsn,refstringszdescription,integercbdescriptionmax,refintegerpcbdescription)libraryodbc32.dll functionintegerSQLAllocConnect(longhenv,reflonghdbc)libraryodbc32.dll functioninte
2、gerSQLConnect(longhstmt,refstringszdsn,integerdsnlen,refstring szuid,integeruidlen,refstringszpt(longhdbc,reflonghstmt)libraryodbc32.dll functionintegerSQLTables(longhstmt,refstringsztablequalifier,integertablequalifierlen,refstringszoe,integernamelen, re
3、fstringsztype,integertypelen)libraryodbc32.dll functionintegerSQLColumns(longhstmt,refstringsztablequalifier,integertablequalifierlen,refstringszoe,integernamelen, refstringsztype,integertypelen)libraryodbc32.dll functionintegerSQLBindCol(longhstmt,intege
4、rcolnum,integerdatatype,refstringname,longmaxlen,reflongactlen)libraryodbc32.dll functionintegerSQLFetch(longhstmt)libraryodbc32.dll functionintegerSQLError(longlenv,longhdbc,longhstmt,refstringsqlstate,reflongnativeerror,refstringerrormsg,integererrormsgm
5、ax,refintegererrormsglen)libraryodbc32.dll functionintegerSQLFreeStmt(longhstmt,integerOptions)libraryodbc32.dll 1、functionintegerSQLAllocEnv(reflongphenv)libraryodbc32.dll 参数:reflongphenv引用传递的long类型参数,保存该函数返回的OBDC环境的句柄。 存放在phenv中的值成为以后OBDCAPI函数调用的唯一标识符。
6、 返回值:integer成功时,返回0,失败返回值小于0。 函数功能:获取ODBC环境句柄。 2、functionintegerSQLAllocStmt(longhdbc,reflonghstmt)libraryodbc32.dll 参数:longhdbcODBC环境的句柄。 Reflonghstmt保存SQL语句句柄。 返回值:integer,成功时,返回0,失败返回值小于0。 函数功能:获取SQL语句句柄。 3、functionintegerSQLConnect(longhstmt,refs
7、tringszdsn,integerdsnlen,refstringszuid,integeruidlen, refstringszpt,调用SQLAllocStmt()函数获取的句柄。 Refstringszdsn,ODBC数据源名。 Integerdsnlen,ODBC数据源名的长度。 Refstringszuid,用户帐号。 Integeruidlen,用户帐号长度。 Refstringszpwd,用户口令。 Refintegerpwdlen,用户口令长度。 返回值:integer,成功时
8、,返回值大于0,失败返回值小于0。 函数功能:连接ODBC数据源,并返回连接句柄。 4、functionintegerSQLDisconnect(longhdbc)libraryodbc32.dll 参数:longhdbc连接句柄。 返回值:integer,成功时,返回0,失败返回值小于0。12345下一页>>>>这篇文章来自..,。函数功能:断开连接ODBC数据源。 5、f