|
-
Jun 15th, 2001, 10:30 AM
#1
Thread Starter
Member
Connecting to Oracle
I would like to connect to an Oracle database.
Could anyone tell me how to configure my ODBC DNS
and what is the connection string?
-
Jun 15th, 2001, 10:50 AM
#2
Fanatic Member
You would be better off using ADO. You will also need the Oracle client installed on your macine and any other machine which will use your Application.
You will need to include the references to both ADO and Oracle. These are MS Data Environment, MS ActiveX Data Objects, MS Data Formatting Object Library and Oracle InProc Server x.x Type Library.
Code:
Dim cn As New ADODB.Connection, rs1 As New ADODB.Recordset
UserConnectionString = "Provider=MSDAORA.1;Password=" _
& myLoginUserPassword & ";User ID=" & myLoginUserName _
& ";Data Source=" & myDatabaseServer & ";Persist Security Info=True"
Set cn1 = New ADODB.Connection
cn1.Open UserConnectionString
Set rs1 = New ADODB.Recordset
rs1.CursorType = adOpenDynamic
rs1.LockType = adLockPessimistic
Thats about it! Hope that helps!
Last edited by Mindcrime; Jun 15th, 2001 at 12:32 PM.
Mindcrime : )
ICQ 24003332
VB 5.0, VB 6.0 SP5, COM, DCOM, VB.NET Beta 2, Oracle 8
-
Jun 17th, 2001, 03:37 AM
#3
Thread Starter
Member
Thanks it helps a lot.
, Tadej
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|