Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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: 36
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: 36
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

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