Dim MyDB As Database
Dim MyRecordSet As Recordset
Dim path As String
Dim sql As Stringsql = "Select * From AutoData Where Comment = '" & Well_Name & "' and Record_Index >= " & Str(Index_Start) & "and Record_Index <=" & Str(Index_End)
path = App.pathSet MyDB = OpenDatabase(path & "\xyrep.mdb")Set MySet = MyDB.OpenRecordset(sql, dbOpenDynaset)
"XYREP.MDB"这个数据库(access 97)中有30万条数据,用上面方法查询很慢。用DNS方法来搞更慢,比我直接打开文件还慢,希望各位能提供更快的方法。
Dim MyRecordSet As Recordset
Dim path As String
Dim sql As Stringsql = "Select * From AutoData Where Comment = '" & Well_Name & "' and Record_Index >= " & Str(Index_Start) & "and Record_Index <=" & Str(Index_End)
path = App.pathSet MyDB = OpenDatabase(path & "\xyrep.mdb")Set MySet = MyDB.OpenRecordset(sql, dbOpenDynaset)
"XYREP.MDB"这个数据库(access 97)中有30万条数据,用上面方法查询很慢。用DNS方法来搞更慢,比我直接打开文件还慢,希望各位能提供更快的方法。
如果还有问题,工程发给我,我帮你调 [email protected]
工具>数据库实用工具>转换数据库