User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Oracle section within the Web Development category of DaniWeb, a massive community of 456,565 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,581 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Oracle advertiser: Programming Forums
Views: 5019 | Replies: 4
Reply
Join Date: Oct 2007
Posts: 4
Reputation: kenneth17 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kenneth17 kenneth17 is offline Offline
Newbie Poster

oracle connection from VB.NET 2003

  #1  
Oct 22nd, 2007
Hi All

I am trying to connect to my database from the front end in VB.NET 2003, the connection strings that i have tried are not working at present. I have VB.NET 2003 program from last year but that was using access as the back end and VB.NET 2003 as the front end. This year i must use oracle as the back end and Vb.Net 2003 as the front end. The connection strings that i have tried do not seem to be correct but i will keep trying it is probably something simple. Yes the database does connect through odbc and the tns file is correct
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Posts: 5
Reputation: alidabiri is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
alidabiri alidabiri is offline Offline
Newbie Poster

Re: oracle connection from VB.NET 2003

  #2  
Oct 23rd, 2007
this is what i use with vb and oracle 10g:
strCon = "Driver={Microsoft ODBC for Oracle}; " & _
         "CONNECTSTRING=(DESCRIPTION=" & _
         "(ADDRESS=(PROTOCOL=TCP)" & _
         "(HOST=111.222.333.18)(PORT=1521))" & _
         "(CONNECT_DATA=(SERVICE_NAME=mydata))); uid=user_id;pwd=your_psw;"

Dim oCon 
oCon.Open strCon
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,445
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 87
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: oracle connection from VB.NET 2003

  #3  
Oct 23rd, 2007
try to use this as connection string.

Provider=OraOLEDB.Oracle.1;Password=tiger;Persist Security Info=True;User ID=scott;Data Source=orcl


hope that solves your problem.
Share your Knowledge.
Reply With Quote  
Join Date: Oct 2007
Posts: 4
Reputation: kenneth17 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kenneth17 kenneth17 is offline Offline
Newbie Poster

Re: oracle connection from VB.NET 2003

  #4  
Oct 23rd, 2007
Originally Posted by debasisdas View Post
try to use this as connection string.

Provider=OraOLEDB.Oracle.1;Password=tiger;Persist Security Info=True;User ID=scott;Data Source=orcl


hope that solves your problem.



This seems to be ok but will not return any information from oracle database, keeps falling over when i try to open a form when in run time. error is

An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll


 Dim ConnectionData As String = "Provider=OraOLEDB.Oracle.1;Password=tigger;Persist Security Info=True;User ID=ken;Data Source=derby"



        Dim DA As New OleDb.OleDbDataAdapter(SQLComm, ConnectionData)
        Dim DT As New DataTable
        DA.Fill(DT)      ''''' Falls over here when i open a form at runtime:confused: 
        DA.Dispose()

        Return DT
    End Function
Last edited by kenneth17 : Oct 23rd, 2007 at 2:11 pm. Reason: text was off page
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,445
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 87
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: oracle connection from VB.NET 2003

  #5  
Oct 24th, 2007
That might be because of the driver is not installed properly.

try to use the following

Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=orcl;Persist Security Info=True
Share your Knowledge.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Oracle Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Oracle Forum

All times are GMT -4. The time now is 5:53 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC