Here's what I'm trying to do:

I have a DSN for an Oracle ODBC Connection. My code needs to attempt to read from a file first the connection string, followed by the SQL commands to be executed. All of this I have down already, except for the Database name in the connection string. Every time I run the application, it always brings up a dialog box asking for the 'Service Name' (I'm assuming that's the database name). The only way around this I have found is to specify the service name in the configuration of the DSN, but that's not good enough for what I'm trying to do.

So my question is this: How can I specify different service names in the connection string so that the whole application can be read from files and not use a dialog box at all?

I've tried strings like "DSN=[DSN];SERVICENAME=[NAME];UID=[ID];PWD=[Password];" and chaged the SERVICENAME to SID or SERVICE or SN....but none of it works...it wil always bring up the dialog asking for the serivice name.

Anyone have any suggestions?

Thanks a lot!

Sorry for the self-reply, but I seem to have found my answer!

In case anyone happens to be curious, instead of anything along the lines of ServiceName, i needed to put a DBQ there instead. Once I did that, everything worked fine. Thanks to those who might have read this and were trying to come up with an answer though!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.