RDO + Replication ID Issue 
Author Message
 RDO + Replication ID Issue

Hi All

We are currently experiencing an RDO related issue when trying to insert
records, containing a replication id (GUID) as their primary key, into a
table in a Jet database.  When the insertion is attempted a Run-time Error
'40002' is received.

The routine, within an application developed in Visual Basic 6 Enterprise,
that performs the insertion uses an RDO connection to the database and a SQL
action query to perform the 'INSERT INTO'.  The replication ID is correctly
formatted in the 'INSERT INTO' statement, eg. {guid
{11223344-1122-1122-1122-AABBCCDDEEFF}}.

The exact error message received shows the GUID with only one } and so it
appears the Access ODBC Driver is using escape clause scanning.  This should
not be the case since SQLSetConnectOption is being used to switch scanning
off for the RDO Connection in use as described in MS Article Q197883.

The machine on which the application is being developed and tested has a
very recent version of MDAC 2.12 installed.

Has anyone else experienced this behavior?  Does anyone know of a solution
or any pointers as to what we may be doing wrong?

Any help would be greatly appreciated.

Thanks in advance,

Karl Flower



Sat, 06 Jul 2002 03:00:00 GMT  
 RDO + Replication ID Issue
Hi All

Well it seems with a little more digging we have answered our own question!

Despite the numerous examples provided by Microsoft and the information in
Article Q197883, the correct format of guid's in SQL statements to be
performed by the MS Access ODBC Driver is {giud
'11223344-1122-1122-1122-AABBCCDDEEFF'}.  This is in contrast to the format
used in many MS examples where they use {guid
{11223344-1122-1122-1122-AABBCCDDEEFF}} which causes the run-time error
40002.  The correct format was found after finally finding the GUID Escape
Sequences section of ODBC Help in MSDN.

We hope this might be of help to anyone else struggling with similar example
code.  Are we misunderstanding the examples or are they blatantly incorrect?

Happy Development

Karl.
-----


Quote:
> Hi All

> We are currently experiencing an RDO related issue when trying to insert
> records, containing a replication id (GUID) as their primary key, into a
> table in a Jet database.  When the insertion is attempted a Run-time Error
> '40002' is received.

> The routine, within an application developed in Visual Basic 6 Enterprise,
> that performs the insertion uses an RDO connection to the database and a
SQL
> action query to perform the 'INSERT INTO'.  The replication ID is
correctly
> formatted in the 'INSERT INTO' statement, eg. {guid
> {11223344-1122-1122-1122-AABBCCDDEEFF}}.

> The exact error message received shows the GUID with only one } and so it
> appears the Access ODBC Driver is using escape clause scanning.  This
should
> not be the case since SQLSetConnectOption is being used to switch scanning
> off for the RDO Connection in use as described in MS Article Q197883.

> The machine on which the application is being developed and tested has a
> very recent version of MDAC 2.12 installed.

> Has anyone else experienced this behavior?  Does anyone know of a solution
> or any pointers as to what we may be doing wrong?

> Any help would be greatly appreciated.

> Thanks in advance,

> Karl Flower




Sat, 06 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Openform with replication ID

2. Need aid using Replication IDs in code

3. Need an AutoNumber Replication ID

4. Referring to a Replication ID's

5. Replication Id in ASP - desperately need help

6. Crystal and Access 97 with replication id's

7. Using Access 97 replication ID's with VB5 data control and other bound controls

8. Using an Access database with replication ID's as primary keys in VB

9. SQL Server Replication. Vb Issue

10. Speed issue with ADO v's RDO

11. ADO / RDO / DAO - Performance related issues

12. ADO / RDO / DAO - Performance related issues

 

 
Powered by phpBB® Forum Software