
VB3 Problem connecting to Oracle via ODBC
I am having a problem connecting to (Personal) Oracle 7.3 from VB3. I
have the following code:
Dim TrackData as String
Dim lsDS.... etc etc
This area has code to retrieve the settings from
ODBC.INI
and our security system, the following lines in for
readability,
as the values are returned correctly.
lsDSN = "Oracle73_16"
lsUser = "UserName"
lsPass = "Password"
lsODBC = "ODBC; "
lsODBC = lsODBC & "DSN=" & lsDSN & "; "
lsODBC = lsODBC & "UID=" & lsUser & "; "
lsODBC = lsODBC & "PWD=" & lsPass & "; "
Set TrackData = OpenDatabase("", False, False, lsODBC)
Now this always brings up a Select Data Source box, which when I click
on 'Oracle73_16' and click OK it goes straight in without bringing up or
needing the User/Password entry again.
I have tried using a DBQ=local_test; entry in the connect string to
no avail. I have also tried a DATABASE=local_database; entry,
and DATABASE = 2: ; (Personal Oracle Connect String) again with no luck.
I have used ODBC before on both 16 and 32 bit flavours of VB, but have
not had this problem before, but this is the first time I am trying to
automate an ORACLE logon (I have done it successfully with Informix and
SQL server).
The Oracle ODBC test util works fine, and I can attach tables from the
O73 database into Access2, so the ODBC is set up OK, it is just a VB
thing, and I CANNOT find it!
Can anyone shed dome light on the matter?
Cheers
Ian Venner
Project Manager
Ad Valorem