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