VB程序员博客
VB程序开发
Dim strsql As String
strsql = "select * from 合同表 where '" & Trim(cobSerch.Text) & "'='" & Trim(txtSerchz.Text) & "'"
dbConn.Execute strsql
点击搜索,把查找的数据绑定到datagrid控件上,下面该怎么写,谢谢
strsql = "select * from 合同表 where '" & Trim(cobSerch.Text) & "'='" & Trim(txtSerchz.Text) & "'"
Conn.Open
Rs.CursorLocation = adUseClient
Rs.Open strsql,Conn, adOpenStatic, adLockOptimistic
Set DataGrid.DataSource = Rs
学习
ref: m1 :)
Set Me.DataGrid1.DataSource = Rs
- VBScript code
-
Set Me.DataGrid1.DataSource = Rs
==== 思想重于技巧 ====