Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Moving an app from MSSQL to Oracle
Try something like the following:
Public WithEvents cn As ADODB.Connection public LoginSucceeded as boolean
Private Sub ConnectToDB()
dim strConnection as string
On Error GoTo ErrHandlerLogin
Set cn = New ADODB.Connection
With cn
.ConnectionTimeout = 20 .CursorLocation = adUseClient .Provider = "MSDAORA"
Exit Sub
ErrHandlerLogin:
MsgBox Error, vbOKOnly
LoginSucceeded = False
end sub
HTH,
Pete's
"Dan McLoughlin" <infoserve_at_indigo.ie> wrote in message news:<P29B7.2020$8s4.7457_at_news.indigo.ie>...
> Hi all,
>
> I am trying to connect to an Oracle database with a VB application that
> curreently uses a SQL database. I set up the connection for SQL as follows:
>
> Public conMain As Connection
> .
> .
> Set conMain = New Connection
> .
> .
> ' get database settings from registry
> strDatabasePath = GetSetting("MyDB", "ConnectionDetails", "DatabasePath")
> strDatabaseUser = GetSetting("MyDB", "ConnectionDetails", "DatabaseUser")
> strDatabasePassword = GetSetting("MyDB", "ConnectionDetails",
> "DatabasePassword")
> strDatabase = GetSetting("MyDB", "ConnectionDetails", "Database")
> .
> .
> 'set the connection properties
> conMain.Properties("Data Source") = strDatabasePath ' machine name
> conMain.Properties("User ID") = strDatabaseUser ' user name
> conMain.Properties("Password") = strDatabasePassword ' password
> 'connect to SQL
> conMain.Open
> 'specify db to use
> conMain.DefaultDatabase = g_Database '
>
> Can anyone please tell me what is the equivalent connection string for an
> Oracle 8i database, plus any other problems to expect after I make the
> connection. Any help would be much appreciated.
>
> BTW, re the previous discussion on Oracle vs MSSQL, I don't know anything
> about Oracle, but after downloading it from the web I had it installed and
> my SQL database migrated in a few hours without any problems.
>
> Dan.
Received on Tue Oct 23 2001 - 08:27:40 CDT
![]() |
![]() |