Home » Open Source » Programming Interfaces » Oracle Lite + ADO.NET + C# (Oracle Lite 10g, Visual Studio 2008, Win XP)
Oracle Lite + ADO.NET + C# [message #355951] Tue, 28 October 2008 12:40 Go to next message
Messages: 1
Registered: October 2008
Location: Berlin
Junior Member
Hi all!

I need to use Oracle Lite with C#. I did google three days and read tutorials, but I have got problems to use the oracle lite database or driver in C#. I created a Oracle Lite Database with createdb.exe on command line. With msql.exe command line tool, I could work correctly with this created database. Furthermore I I created Java-Project and used JDBC to communicate with my database. It works fine. But unfortunately I could not use Java but C#. I created C#-Project in Visual Studio 2008 and referenced libraray Oracle.DataAccess.Lite.dll. Unfortunately I could not open a connection to my database. Could somebody please tell me, what I'm doing wrong?. It would be very very great if somebody could answer me!!

Here is my code:
String DSN = "POLITE";
IDbConnection conn = new OracleConnection(DSN);
conn.ConnectionString = "Database=GREENE;DSN=POLITE;UID=SYSTEM;PWD=MANAGER";

Error message is: Oracle.DataAccess.Lite.OracleException: [POL-3013] bad database or invalid password

But password and database name are correct. My correct working JDBC URL is:
Connection conn = DriverManager.getConnection(
"jdbc:polite:greene;" +
"IsolationLevel=READ COMITTED;" +

Thank you very much in advance!
Bye Aness
Re: Oracle Lite + ADO.NET + C# [message #360392 is a reply to message #355951] Thu, 20 November 2008 16:39 Go to previous message
Messages: 3
Registered: November 2008
Location: Suitland, Maryland
Junior Member
Hi Aness,

ADO.Net may not be the problem, but your ODBC driver could be 2.0 which I have had a boatload of trouble with with Visual Studio 2008. If you are loading olod2040.dll then you are using 2.0, you need to load the olod3540.dll to get the 3.5 driver.

The 2.0 driver is the default installation.

You must also package the Oracle.DataAccess.Lite.dll assembly with the .exe when deploying or put it on the target machine and put it's path in the Global Assembly Cache with GACutil.exe (on SDK). You must have administrator rights and also run as administrator (open a dos box with run as administrator) if you are targeting Vista, for XP and Win2000 you only have to have administrator rights.


[Updated on: Fri, 21 November 2008 12:47]

Report message to a moderator

Previous Topic: ODBC connection works but not JDBC
Next Topic: How to give PHP argument to oracle select?
Goto Forum:

Current Time: Thu Oct 27 18:30:43 CDT 2016

Total time taken to generate the page: 0.14100 seconds