Dim conn As New ADODB.Connection With conn .ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\数据库.mdb" .CursorLocation = adUseClient .Open End With text1.text = UBound(cnn.Execute("select count(*) from [数据表]").GetRows, 2) + 1 cnn.Close
Dim conn As New ADODB.Connection With conn .ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\数据库.mdb" .CursorLocation = adUseClient .Open text1.text = UBound(.Execute("select count(*) from [数据表]").GetRows, 2) + 1 .Close End With
Dim conn As New ADODB.Connection With conn .ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\数据库.mdb" .CursorLocation = adUseClient .Open text1.text = UBound(.Execute("select * from [数据表]").GetRows, 2) + 1 .Close End With
楼主你真..text1.text = rst.Fields(1).value
With conn
.ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\数据库.mdb"
.CursorLocation = adUseClient
.Open
End With
text1.text = UBound(cnn.Execute("select count(*) from [数据表]").GetRows, 2) + 1
cnn.Close
With conn
.ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\数据库.mdb"
.CursorLocation = adUseClient
.Open
text1.text = UBound(.Execute("select count(*) from [数据表]").GetRows, 2) + 1
.Close
End With
With conn
.ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\数据库.mdb"
.CursorLocation = adUseClient
.Open
text1.text = UBound(.Execute("select * from [数据表]").GetRows, 2) + 1
.Close
End With