Link to home
Start Free TrialLog in
Avatar of ashraf_t
ashraf_t

asked on

about ADO

hi , iam ADO new user , i want to ask about a problem i face , first when i want to make a connection i use this:

Dim DB As New ADODB.Connection
Dim DBT As New ADODB.Recordset
   
DB.Open "DSN=MS Access Database; DBQ=C:\TestDB\Access.mdb;DefaultDir=C:\TestDB; " _
         & "DriverId=281;FIL=MS Access; MaxBufferSize=2048; PageTimeout=5;UID=admin;"
   
DBT.Open "test_spe", DB, adOpenDynamic, , adCmdTable


and this works but when i want to make a search i tried to use the index an seek but i found that the index and seek methods not supported as i found by using:

DBT.Supports(adIndex) & "   " and DBT.Supports(adSeek)

so i used find method but i found that it is very slow comparing to seek

another problem : i cannot use addnew and update to add records so i used insert into

is there a problem with my code and why index \ seek and addnew \ update not work ?
ASKER CERTIFIED SOLUTION
Avatar of inthedark
inthedark
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Soory for typos

b) Use find sed function FindOK

should say

b) Use the recordset.Find (see the function ADO.FindOK)
Avatar of ashraf_t
ashraf_t

ASKER

thanx a lot