Error code returned by ADO

S

S.L.

If I use ADO with OLE DB Provider for Microsoft Jet 4.0 and in the future if
I change from Jet to SQL Server 2000. I would like to know that error code
returned by each OLE DB Provider will be mapped to the same code in ADO
Error object ? Or for each OLE DB Provider I have to handling code
seperately ?

TIA
 
M

Mary Chipman

I don't understand what you are asking. Each provider will have its
own error codes. Jet is in no way equivalent to SQL Server, so you
can't expect that they will somehow return the same errors. FWIW, SQLS
is capable of returning multiple errors, while Jet returns one at a
time, so there will likely be differences in the way you handle them
in your code.

-- Mary
MCW Technologies
http://www.mcwtech.com
 
S

S.L.

Hi, After post here, this is what I found in msdn
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndao/html/
daotoadoupdate_topic9.asp

"The code is very similar. Note, however, that the ADO code will print two
different error numbers. The first number is the ADO/OLE DB error code. This
error code will be the same for similar errors regardless of the provider
being used. This allows you to write ADO applications that can handle errors
even when the provider is changed. The second number is a provider-specific
error code. When using the Microsoft Jet Provider, this error number will be
the same error number that DAO returns. However, other providers may return
different numbers for this type of error."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top