Click here to Skip to main content
15,915,019 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hii folks
i want to create connection with oracle database using dll here is the code
OleDbConnection con = new OleDbConnection("connection string");
           OleDbCommand cmd = con.CreateCommand();
           cmd.CommandText = "select sb_no from shipbill where sb_no='4790421'";
           con.Open();
           OleDbDataReader dr = cmd.ExecuteReader();
           while (dr.Read())
           {
               textBox2.Text = dr["sb_no"].ToString();
           }

how can i use it in my application

OR

from where can i get the desired dll
plz help me
thanx in advance...have a nice day...
Posted
Updated 16-Aug-11 20:35pm
v2

Instead of using OleDb, if possible, try using ODP.NET: http://www.oracle.com/technetwork/topics/dotnet/index-085163.html[^]

With that library you can use all the features of the Oracle database and the coding will be much more efficient because you are not restricted by the ole db library.

Classes you will need in your example with odp are:


Also don't concatenate literals to the sql statement. Use OracleParameter[^] instead
 
Share this answer
 
Comments
Espen Harlinn 17-Aug-11 18:13pm    
Excellent advice, my 5
Wendelius 18-Aug-11 0:27am    
Thank you Espen :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900