直接通过ODBCAPI访问SQL数据库

来源:计算机等级考试    发布时间:2012-08-29    计算机等级考试视频    评论


  Declare Function SQLFetch Lib "odbc32.dll" (ByVal lStmt As Long) As Integer
  Declare Function SQLGetData Lib "odbc32.dll" (ByVal lStmt As Long, ByVal col As Integer, _
  ByVal wConvType As Integer, ByVal lpbBuf As String, _
  ByVal dwbuflen As Long, lpcbout As Long) As Integer
  Declare Function SQLGetInfo Lib "odbc32.dll" (ByVal ldbc As Long, ByVal hWnd As Long, _
  ByVal szInfo As String, ByVal cbInfoMax As Integer, _
  cbInfoOut As Integer) As Integer
  Declare Function SQLError Lib "odbc32.dll" (ByVal env As Long, ByVal ldbc As Long, _
  ByVal lStmt As Long, ByVal SQLState As String, _
  NativeError As Long, ByVal Buffer As String, _
  ByVal Buflen As Integer, Outlen As Integer) As Integer
  #Else
  Declare Function SQLAllocEnv Lib "odbc.dll" (env As Long) As Integer
  Declare Function SQLFreeEnv Lib "odbc.dll" (ByVal env As Long) As Integer
  Declare Function SQLAllocConnect Lib "odbc.dll" (ByVal env As Long, ldbc As Long) As Integer
  Declare Function SQLConnect Lib "odbc.dll" (ByVal ldbc As Long, ByVal Server As String, _
  ByVal serverlen As Integer, ByVal uid As String, _
  ByVal uidlen As Integer, ByVal pwd As String, _
  ByVal pwdlen As Integer) As Integer
  Declare Function SQLDriverConnect Lib "odbc.dll" (ByVal ldbc As Long, ByVal hWnd As Integer, _
  ByVal szCSIn As String, ByVal cbCSIn As Integer, _
  ByVal szCSOut As String, ByVal cbCSMax As Integer, _
  cbCSOut As Integer, ByVal f As Integer) As Integer
  Declare Function SQLFreeConnect Lib "odbc.dll" (ByVal ldbc As Long) As Integer
  Declare Function SQLDisconnect Lib "odbc.dll" (ByVal ldbc As Long) As Integer
  Declare Function SQLAllocStmt Lib "odbc.dll" (ByVal ldbc As Long, lStmt As Long) As Integer
  Declare Function SQLFreeStmt Lib "odbc.dll" (ByVal lStmt As Long, ByVal EndOption As Integer) As Integer
  Declare Function SQLTables Lib "odbc.dll" (ByVal lStmt As Long, ByVal q As Long, _
  ByVal cbq As Integer, ByVal o As Long, _
  ByVal cbo As Integer, ByVal t As Long, _
  ByVal cbt As Integer, ByVal tt As Long, _
  ByVal cbtt As Integer) As Integer
  Declare Function SQLExecDirect Lib "odbc.dll" (ByVal lStmt As Long, ByVal sqlString As String, _
  ByVal sqlstrlen As Long) As Integer
  Declare Function SQLNumResultCols Lib "odbc.dll" (ByVal lStmt As Long, NumCols As Integer) As Integer
  Declare Function SQLDescribeCol Lib "odbc.dll" (ByVal lStmt As Long, ByVal colnum As Integer, _
  ByVal colname As String, ByVal Buflen As Integer, _
  colnamelen As Integer, dtype As Integer, dl As Long, _
  ds As Integer, n As Integer) As Integer
  Declare Function SQLFetch Lib "odbc.dll" (ByVal lStmt As Long) As Integer
  Declare Function SQLGetData Lib "odbc.dll" (ByVal lStmt As Long, ByVal col As Integer, _
  ByVal wConvType As Integer, ByVal lpbBuf As String, _
  ByVal dwbuflen As Long, lpcbout As Long) As Integer
  Declare Function SQLGetInfo Lib "odbc.dll" (ByVal ldbc As Long, ByVal hWnd As Integer, _
  ByVal szInfo As String, ByVal cbInfoMax As Integer, _
  cbInfoOut As Integer) As Integer
  Declare Function SQLError Lib "odbc.dll" (ByVal env As Long, ByVal ldbc As Long, _
  ByVal lStmt As Long, ByVal SQLState As String, _
  NativeError As Long, ByVal Buffer As String, _
  ByVal Buflen As Integer, Outlen As Integer) As Integer
  #End If

  编辑特别推荐:

  一个简单实用的vb加密/解密算法

  利用磁盘的序列号进行软件加密

上一页234下一页

视频学习

我考网版权与免责声明

① 凡本网注明稿件来源为"原创"的所有文字、图片和音视频稿件,版权均属本网所有。任何媒体、网站或个人转载、链接转贴或以其他方式复制发表时必须注明"稿件来源:我考网",违者本网将依法追究责任;

② 本网部分稿件来源于网络,任何单位或个人认为我考网发布的内容可能涉嫌侵犯其合法权益,应该及时向我考网书面反馈,并提供身份证明、权属证明及详细侵权情况证明,我考网在收到上述法律文件后,将会尽快移除被控侵权内容。

最近更新

社区交流

考试问答