Data Provider Problem

  • Thread starter Thread starter Phill
  • Start date Start date
P

Phill

I have a database (Access 2000) that uses ADO to populate
the forms. Quite frequently I get an error saying "-
2147467259 Database currently locked by <me> on <my
machine>". So, as per Q331594 I changed my connection
string from CurrentProject.Connection
to "Provider=MSDASQL.1;DBQ=" & Application.CurrentDb.Name
& ";Driver={Microsoft Access Driver (*.mdb)}". Now my
query to populate the form no longer works (presumably
because I use GUIDs as a primary key). Here is the query
that no longer works "SELECT * FROM tblInventory WHERE
InventoryID={guid {36ECCCC7-3D97-48BC-8BB0-2A4BE89137D1}}
ORDER BY VIN ASC". What is the new syntax and is this
even going to fix my original problem? Thanks
 
Do you have a good reason for using GUIDs for your primary key?

I was recently working on a database for a customer who had started it with
GUID primary keys.
I ran into one problem after another (especially in Access 2000), until I
changed the primary keys to long integers.

HTH
- Turtle
 
I get an error message basically saying "syntax in query
expression 'InventoryID=guid xxxx'. I have to use GUIDs
as a primary key because this is a mobile application and
has to sync up with the office database (which is also
being updated). Thanks.
 
Back
Top