VB+SQL语句事例代码(国外英文资料).doc

  1. 1、本文档共23页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VBSQL语句事例代码(国外英文资料)

VB+SQL语句事例代码(国外英文资料) Specific code for VB design -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- One. Required classes [Students] / / Students -- -- -- -- -- -- -- - Member functions (specific function implementation and parameter omission) Init / / uncommented is similar to the above, not to mention The Delete GetInfo GetName GetNewld The Insert Load_By_Class / / reads all the student Numbers in the specified class to the array Arr_StuId () and Arr_StuName () The Update Update_Transfer / / changes the class information Class_Id for the student, which is used when the class is switched Load_By_Class concrete implementation: { The Pulic Sub Load_By_Class (By Val TempClassId As Integer) Dim I As Integer / / initialize the class array Erase Arr_StuId/Erase statement reinitializes the element of the fixed array and the storage space for the dynamic array ReDim Arr_StuId (0) / / ReDim redistributes storage space for array variables Erase Arr_StuName ReDim Arr_StuName (0) DB_Connect / / connection database SqlStmt = SELECT Student_Id, Student_Name FROM Students WHERE Class_Id - + Trim (TmpClassId) + ORDER BY Student_Id / / to execute the SQL statement The effect of Trim in / / VB is to remove the Spaces in the string, for example, here Remove the whitespace from the string TmpClassId and assign it to Class_Id. OdbcExt (SqlStmt) / / execute SQL statements I = 0 The function of the Do Unitil SQLFetch (Hstmt) = SQL_NO_DATA_FOUND / / SQLFetch function will be The current record pointer for the result set moves to the next record ColVa = String (40, 0) Rc = SQLGetData (Hstmt, 1, 1, ColVal, Len (ColVal), pcblen) ReDim Preserve Arr_StuId (I + 1) Arr_StuId (I) = Val (ColVal) ColVal = String (40, 0) Rc = SQLGetData

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档