.Net OdbcConnection for Oracle Lite 40 ODBC Driver
-
Hi everyone, It seems there is next to no help online anywhere for using the Odbc classes in the .Net framework with Oracle Lite. There is plenty of online info for full blown Oracle but that appears to be no use to me. Has anybody had any experience with this? My connection string as it stands is: Driver={Oracle Lite 40 ODBC Driver};dsn=faultdb9i;UID=system;PWD=XXXXXXXXX; but I get "POL-3203 Error: Database does not exist". It does exist, and I can connect to it fine using Oracles MSQL application. I have tried many different variations of connection string with no success - I've stuck with this one as the .net framework is at least catching an Oracle error so I must be getting close. Is there some magic connection string parameter for use with Oracle Lite? Many thanks, Chris Chambers.
-
Hi everyone, It seems there is next to no help online anywhere for using the Odbc classes in the .Net framework with Oracle Lite. There is plenty of online info for full blown Oracle but that appears to be no use to me. Has anybody had any experience with this? My connection string as it stands is: Driver={Oracle Lite 40 ODBC Driver};dsn=faultdb9i;UID=system;PWD=XXXXXXXXX; but I get "POL-3203 Error: Database does not exist". It does exist, and I can connect to it fine using Oracles MSQL application. I have tried many different variations of connection string with no success - I've stuck with this one as the .net framework is at least catching an Oracle error so I must be getting close. Is there some magic connection string parameter for use with Oracle Lite? Many thanks, Chris Chambers.
Are you sure about the error? Based on documentation POL-3203 means "Bad BLOB block address". Also you could could try to use connection string like:
dsn=faultdb9i;UID=system;PWD=XXXXXXXXX (without driver info)
or
Driver={Oracle Lite 40 ODBC Driver};server=faultdb9i;UID=system;PWD=XXXXXXXXX
Mika
The need to optimize rises from a bad design. My articles[^]
-
Are you sure about the error? Based on documentation POL-3203 means "Bad BLOB block address". Also you could could try to use connection string like:
dsn=faultdb9i;UID=system;PWD=XXXXXXXXX (without driver info)
or
Driver={Oracle Lite 40 ODBC Driver};server=faultdb9i;UID=system;PWD=XXXXXXXXX
Mika
The need to optimize rises from a bad design. My articles[^]
Hi Mika, Thanks for looking into that for me. The error was my mistake - a typo. I meant POL-3023 which really is "The database does not exist". The Microsoft ODBCConnection class won't accept a connection string without a driver and I tried using the server item too but that didn't work either - still got POL-3023. After spending the best part of 6 hours researching and trying dozens of different variations of connection string I decided to give up on the System.Data.ODBC namespace and opt for the Oracle.DataAccess.Lite DLL direct from Oracle instead. Unfortunately you can only get your hands on it by downloading the 400MB+ Oracle 10g Lite installation package but, once I'd done that, it worked first time with:
dsn=faultdb9i;UID=system;PWD=XXXXXXXXX
Oh well, you win some, you lose some. Cheers, Chris.
-
Hi Mika, Thanks for looking into that for me. The error was my mistake - a typo. I meant POL-3023 which really is "The database does not exist". The Microsoft ODBCConnection class won't accept a connection string without a driver and I tried using the server item too but that didn't work either - still got POL-3023. After spending the best part of 6 hours researching and trying dozens of different variations of connection string I decided to give up on the System.Data.ODBC namespace and opt for the Oracle.DataAccess.Lite DLL direct from Oracle instead. Unfortunately you can only get your hands on it by downloading the 400MB+ Oracle 10g Lite installation package but, once I'd done that, it worked first time with:
dsn=faultdb9i;UID=system;PWD=XXXXXXXXX
Oh well, you win some, you lose some. Cheers, Chris.
That's odd. Normally it's enough that you specify a DSN if it's correctly defined in Control Panel. Driver is typically needed only if you create a DSN on-the-fly. However, I believe that native client will be much better for you since it's more efficient and allows you to better use Oracle specific features. About the client. I typically use full Oracle client when connecting to Oracle and I'm under the impression that it works against any Oracle database edition (starting from version 9i). Have you tried using Oracle Data Access Components (ODAC). If you have time, I think it's worth checking out. The download size is less than 50 megabytes and it supports xcopy deployment. Mika
The need to optimize rises from a bad design. My articles[^]
-
That's odd. Normally it's enough that you specify a DSN if it's correctly defined in Control Panel. Driver is typically needed only if you create a DSN on-the-fly. However, I believe that native client will be much better for you since it's more efficient and allows you to better use Oracle specific features. About the client. I typically use full Oracle client when connecting to Oracle and I'm under the impression that it works against any Oracle database edition (starting from version 9i). Have you tried using Oracle Data Access Components (ODAC). If you have time, I think it's worth checking out. The download size is less than 50 megabytes and it supports xcopy deployment. Mika
The need to optimize rises from a bad design. My articles[^]
Mika Wendelius wrote:
That's odd. Normally it's enough that you specify a DSN if it's correctly defined in Control Panel. Driver is typically needed only if you create a DSN on-the-fly.
That's exactly what I thought, but I always got an Invocation exception when I didn't specify a driver. I know that the datasource is set up correctly because I have an older C++ application that uses good old-fashioned ADO that connects fine with just the DSN, the UID and the PWD.
Mika Wendelius wrote:
Have you tried using Oracle Data Access Components (ODAC). If you have time, I think it's worth checking out.
I haven't, but I will certainly investigate it. Thanks for your help Mika. Regards, Chris Chambers.
-
Mika Wendelius wrote:
That's odd. Normally it's enough that you specify a DSN if it's correctly defined in Control Panel. Driver is typically needed only if you create a DSN on-the-fly.
That's exactly what I thought, but I always got an Invocation exception when I didn't specify a driver. I know that the datasource is set up correctly because I have an older C++ application that uses good old-fashioned ADO that connects fine with just the DSN, the UID and the PWD.
Mika Wendelius wrote:
Have you tried using Oracle Data Access Components (ODAC). If you have time, I think it's worth checking out.
I haven't, but I will certainly investigate it. Thanks for your help Mika. Regards, Chris Chambers.