find on an access database usind ado 
Author Message
 find on an access database usind ado

I am having trouble trying to find a record mathcing three
I have an input text file and wish to create records in my
database. In order to avoid duplicating records I am using
the find command as follows to see if a record exists that
matches the three fields from the input file. Using only
one key there is no problem but when I try to use multiple
keys I get the following error message:

runtime error 3001 - arguments are of the wrong type, are
out of acceptable range or are in conflict with one

My find command is as follows

       adoproducts.Recordset.Find "QIREF=  '" + Left
(lineoftext, 8) + "' & QIPART= '" + Mid(lineoftext, 15,
20) + "' & QICMNTIME= '" + Mid(lineoftext, 86, 6) + "'"

Can anybody see what I am doing wrong please.


Ron Grout

Fri, 16 Apr 2004 17:58:34 GMT  
 find on an access database usind ado
Your string concatenation is incorrect, thus the error you are getting. Try

"QIREF= '" & Left(lineoftext,8) & "' AND QIPART = '" &
Mid(lineoftext,15,20) & "' AND QICMNTIME= '" & Mid(lineoftext,86,6) & "'"

Hope this helps.

Steven Bras, MCSD
Microsoft Developer Support/Visual Basic WebData

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights

Sun, 18 Apr 2004 06:43:46 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Decimal Problem usind ADO and Microsoft Oracle ODBC driver

2. Problem usind ADO VB6 x SQL 6.5

3. Can't find installable ISAM when accessing Access 2000 database

4. Accessing Access with database level password using ADO

5. ADO using MS Access with mdw system database for pw-access

6. FIND method using ADO 2.5+ VB6 and SQL database

7. Ado Database (Find)

8. ADO Database Control (find)

9. ADO control do not find database when specified by code

10. Problem with OutputTo usind Runtime Version Acc97

11. How do i query a table usind DAO?

12. Closing DUN usind SendMessage


Powered by phpBB® Forum Software