Link to home
Start Free TrialLog in
Avatar of vinaikk
vinaikk

asked on

VB Accessing Oracle using SQL NET8

I have a software created in VB6.  i have used ADO to connect to a oracle DB.  Where ever i install this software i have to install Oracle client.  is there anyway by which i can install 0nly SQL NET8 or some thing which can be used to connect to Oracle DB
Avatar of AndrewDev
AndrewDev

Yes you only need the driver. Below is my answer to a previous questioner:

If you use ADO all you need is the oracle driver.
Here is the syntax for using an ADO DSNless connection
with Oracle

For the current Oracle ODBC Driver from Microsoft:

oConn.Open "Driver={Microsoft ODBC for Oracle};" & _
                  "Server=OracleServer.world;" & _
                  "Uid=myUsername;" & _
                  "Pwd=myPassword;"

For the older Oracle ODBC Driver from Microsoft:

oConn.Open "Driver={Microsoft ODBC Driver for Oracle};" & _
                  "ConnectString=OracleServer.world;" & _
                  "Uid=myUsername;" & _
                  "Pwd=myPassword;"


or using OLDB
OLE DB Provider for Oracle (from Microsoft)

oConn.Open "Provider=msdaora;" & _
                  "Data Source=MyOracleDB;" & _
                  "User Id=myUsername;" & _
                  "Password=myPassword;"

For more information, see: Microsoft OLE DB Provider for Oracle



OLE DB Provider for Oracle (from Oracle)

For Standard Security:

oConn.Open "Provider=OraOLEDB.Oracle;" & _
                  "Data Source=MyOracleDB;" & _
                  "User Id=myUsername;" & _
                  "Password=myPassword;"

For a Trusted Connection:

oConn.Open "Provider=OraOLEDB.Oracle;" & _
                  "Data Source=MyOracleDB;" & _
                  "User Id=/;" & _
                  "Password=;"
' Or

oConn.Open "Provider=OraOLEDB.Oracle;" & _
                  "Data Source=MyOracleDB;" & _
                  "OSAuthent=1;"
 

Note: "Data Source=" must be set to the appropriate Net8 name which is known to the naming method in
use. For example, for Local Naming, it is the alias in the tnsnames.ora file; for Oracle Names, it is
the Net8 Service Name

More information available from
http://technet.oracle.com/docs/tech/nt/ole_db/doc/html/using.htm

Hope this helps
Andrew
ASKER CERTIFIED SOLUTION
Avatar of rkot2000
rkot2000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial