BeauT
asked on
Using .Properties("Prompt")
OK, I am connecting to Oracle8 through ADO 2.1 and I used a code sample to get myself up and running. In this code sample, this code was used:
'Displays a prompt for Service, Username and password
.Properties("Prompt") = adPromptAlways
I seem to be stuck with this though. When I try to assign a different constant(like adPromptNever) or remove this line altogether, I get this error: "TNS:unable to connect to destination"
What I'd really like is to bypass the prompt because this app is supposed to run on a schedule, usually at night after everyone has gone home. Thanks for any help.
Beau
'Displays a prompt for Service, Username and password
.Properties("Prompt") = adPromptAlways
I seem to be stuck with this though. When I try to assign a different constant(like adPromptNever) or remove this line altogether, I get this error: "TNS:unable to connect to destination"
What I'd really like is to bypass the prompt because this app is supposed to run on a schedule, usually at night after everyone has gone home. Thanks for any help.
Beau
ASKER
Those didn't really help. I have tried setting:
..Properties("Prompt") = adPromptNever
and it gives me an error, even when I have all the data needed(I think?) in my connection string. My connection string looks like this:
"DRIVER={Oracle ODBC Driver};SERVER=AAA;UID=MyU ID;PWD=MYP WD;DATABAS E=AAA"
The server and database use the same string because I'm not actually sure which one is necessary. And it still yields a working connection. But I need to now get rid of the prompt altogether.
..Properties("Prompt") = adPromptNever
and it gives me an error, even when I have all the data needed(I think?) in my connection string. My connection string looks like this:
"DRIVER={Oracle ODBC Driver};SERVER=AAA;UID=MyU
The server and database use the same string because I'm not actually sure which one is necessary. And it still yields a working connection. But I need to now get rid of the prompt altogether.
Create a connection using the DataEnvironment object and then copy the ConnectionString property. You will then know which parameters you need.
ASKER
That won't really work for me. I'm using the Oracle ODBC driver, which is not an available driver in the DataEnvironment. Also, I am using a DSN-less connection.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In Oracle use specify the connect string which is required along with a username and a password.
This connect string in ODBC could be specified by the "server" property.
Regards,
Sudhi.
This connect string in ODBC could be specified by the "server" property.
Regards,
Sudhi.
ASKER
ok, I got it to work right. thanks again :-)
Beau
Beau
Did you read those:
http://support.microsoft.com/support/kb/articles/Q200/8/86.ASP?LNG=ENG&SA=ALLKB
http://support.microsoft.com/support/kb/articles/q195/9/82.asp?LNG=ENG&SA=ALLKB
http://support.microsoft.com/support/kb/articles/Q193/1/28.ASP?LNG=ENG&SA=ALLKB
http://support.microsoft.com/support/kb/articles/Q178/3/91.ASP?LNG=ENG&SA=ALLKB