Click to See Complete Forum and Search --> : Oracle-ODBC Provider
smuehlfeld
May 7th, 2001, 06:05 AM
Hi,
I work with VB6 and an Oracle-database. Until now I use OLE with the following code :
Set cn = New ADODB.Connection
With cn
.Provider = "OraOLEDB.Oracle.1" 'Oracle Provider for OLE DB
.CommandTimeout = 15
.Properties("Data Source") = "u8"
.Properties("User ID") = "test"
.Properties("Password") = "test"
.CursorLocation = adUseClient
End With
cn.Open
And now I want to try, how the connection via ODBC works, but I don't know, how I can call the Oracle-ODBC-Provider.
Please help me,
Sascha
Cakkie
May 7th, 2001, 06:25 AM
You will have to include this in the connectionstring property (and leave away the provider property)
DRIVER={Microsoft ODBC for Oracle};
Tom Cannaerts
slisse@planetinternet.be
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Iouri
May 7th, 2001, 07:15 AM
Oracle(Microsoft)
Microsoft OLE DB Provider for Oracle ->MDAORA
oConn.Open "Provider=msdaora;" & _
"Data Source=OracleServer.world;" & _
"User Id=carl;" & _
"Password=;"
Oracle(Oracle)
For Standard Security:
oConn.Open "Provider=OraOLEDB.Oracle;" & _
"Data Source=MyOracleDB;" & _
"User Id=carl;" & _
"Password=;"
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.
'Oracle8
GetConnectionString = "Provider=MSDAORA.1;Password=" & paswoord & ";User ID=" & user & _
";Data Source=" & server & ";Persist Security Info=True"
Iouri Boutchkine
iouri@hotsheet.com
smuehlfeld
May 7th, 2001, 07:38 AM
Hi,
I know, that "OraOLEDB.Oracle" is the OLE-Provider for Oracle, but I don't know, what is the ODBC-Provider for Oracle (and from Oracle).
Sascha
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.