If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Applications & Tools > Connecting VB applicaiton to Oracle 8i

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-22-02, 15:52
svrider svrider is offline
Registered User
 
Join Date: Jul 2002
Posts: 39
Exclamation Connecting VB applicaiton to Oracle 8i

Hello everyone,

I'm moving a VB applicaiton from SQL Server to Oracle 8i.

When connecting to SQL Server, I used OLEDB. Very effective.

I couldn't find how to connect to Oracle 8i using OLEDB, so I relied on the good old ODBC. But I heard that not only is it possible to connect to Oracle through OLEDB, but it is faster...

I guess I need some "How to" hints...

Thanks !

Svrider.
Reply With Quote
  #2 (permalink)  
Old 11-25-02, 15:45
svrider svrider is offline
Registered User
 
Join Date: Jul 2002
Posts: 39
I found it. For all of you VB programmers who wants to connect to an Orace database, here is the connection string for your ADODC connection object :

"Provider=OraOLEDB.Oracle;Data Source=ORCL;User ID=demo252;Password=demo252"

Bye !

SvRider
Reply With Quote
  #3 (permalink)  
Old 12-07-02, 10:16
vududoc vududoc is offline
Registered User
 
Join Date: Jul 2001
Location: NC
Posts: 102
I prefer to use MSDAORA to connect VB6 to Oracle in large networks. It requires that you provide a server name, userID and password which can be hardcoded in the startup form or retrieved from textboxes. You may want to add a commandTimeout and change the cursor location.

sub CONXMAKE

Set m_ORAconx = New ADODB.Connection
Set m_ORAcmd = New ADODB.Command
Set m_ORArs = New ADODB.Recordset

m_strSQL = _
"data source=" & m_Server & ";" & _
"user id=" & m_UID & ";" & _
"password=" & m_UPW

With m_ORAconx
.Provider = "MSDAORA"
.CursorLocation = adUseClient
.ConnectionTimeout = 3
.ConnectionString = m_strSQL
.Open m_strSQL, , , -1
End With

Set m_ORAcmd.ActiveConnection = m_ORAconx

end sub
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On