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.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BeauTAuthor Commented:
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:

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.
Éric MoreauSenior .Net ConsultantCommented:
Create a connection using the DataEnvironment object and then copy the ConnectionString property. You will then know which parameters you need.
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

BeauTAuthor Commented:
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.
Éric MoreauSenior .Net ConsultantCommented:
You can choose the ODBC driver.

I don't want you to use it! I just want you to create a connection using the DataEnvironment object (using the ODBC driver if you want to) and then look at the connection string that will be generated for you. You can then copy this string into your application!

I often use this technique only to see which parameters I must use. Once I have them all, I remove the DataEnvironment object.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.

BeauTAuthor Commented:
ok, I got it to work right. thanks again :-)

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.