连接数据库中问题不能解决??
Private Sub MDIForm_Initialize()Dim mpath As String
mpath = App.Path
If Right(mpath, 1) <> "\" Then mpath = mpath + "\"
Data1.DatabaseName = mpath + "vbdata.mdb"
Data1.RecordSource = "access"
End Sub
Private Sub Command1_Click()
If Data1.Recordset.EOF Then Data1.Recordset.MoveFirst
If Data1.Recordset.EOF Then //有问题
MsgBox "no find! ", vbYesNo, "Unfind"
Load MDIForm1
MDIForm1.Show
Text1(0) = "": Text1(1) = ""
Else
Data1.Recordset.MoveNext
End If
End Sub --------------------编程问答-------------------- 改成如下就行了:
Data1.RecordSource = "access" '首先确定你有名为access这个表,否则设为表名或查询语句
Data1.Refresh '主要是加这句
End Sub
Private Sub Command1_Click()
'Data1.refresh
If Data1.Recordset.EOF Then Data1.Recordset.Move
补充:.NET技术 , VB.NET