• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 375
  • Last Modified:

VB6 connect to Oracle

I'm trying to connect to an oracle db (10) with vb6.  I have the following code in my form_load(). Note: This is basically code I took from an ASP program I wrote that works fine.

Dim Conn As Connection
Dim rs As Recordset
Dim strDB As String, strTable As String, strMsg As String, strSQL As String

strlogin = "eee"
strpass = "fff"

Set Conn = server.CreateObject("ADODB.Connection")
Conn.Open = ("Driver={Microsoft ODBC for Oracle};Server=AAA.BBB.CCC.DDD;User Id=eee;Password=fff;")

strSQL = "select prsn_univ_id from dss_rds.sr_bl_hlth_cntr_gt where prsn_ntwrk_id=ggg"
Set rs = Conn.Execute(strSQL)

Set rs = Nothing


When I run it I get a compile error with the Conn.Open line highlighted with an error message of "Method or Data Member Not Found"

What am I doing wrong?
1 Solution
Carl TawnSystems and Integration DeveloperCommented:
You are using Open like a property rather than a method. It should say:

    Conn.Open "Driver={Microsoft ODBC for Oracle};Server=DSS1PRD.UCS.INDIANA.EDU;User Id=cjaeckel;Password=rothdove;"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now