View Full Version : 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. |
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
| 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 |
vBulletin v3.5.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.