refresh该用什么名字呢?又该加在什么地方
Dim Conn As ADODB.Connection '定义ADODB连接的对象Dim Record As ADODB.Recordset '定义ADODB对象的记录集
Dim ConnStr As String '定义连接字符串
Set Conn = New ADODB.Connection '给对象分配空间
Set Record = New ADODB.Recordset
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
ConnStr = ConnStr & App.Path & "\" & "sdcl.mdb"
Conn.ConnectionString = ConnStr '按照[连接字符串]的内容连接数据库
Conn.Open '连接
Record.Open "Select 站号,后尺下丝,后尺上丝,前尺下丝,前尺上丝,后尺黑面,后尺红面,前尺黑面,前尺红面 From sdcl ", Conn, adLockReadOnly, adLockReadOnly '检索数据
DataGrid1.ReBind