By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,784 Members | 3,536 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,784 IT Pros & Developers. It's quick & easy.

Oracle database connectionstring problem

P: 79
What's the connectionstring to connect to the Oracle9.0 Database Server irrespective of servername,username and password using VB.Net2002 (.Net framework 1.0)?

In case of Microsoft SQL Server the connectionstring is something like:
"Provider=MSOleDB4.0; Server=localhost; Datasource=pubs;
Integrated Security=SSPI".
'Server=localhost' allows the front-end application to identify the database server irrespective of servername. 'Integrated Security=SSPI' allows the front-end application to connect to the database irrespective of username and password.

But I'm looking for the Oracle counterpart of the connectionstring (Provided I'm not using TNS).
In my case I'm simply calling a module that contains a procedure having the connectionstring. I'm providing all the requsites in it namely- Provider, Hostname, Database/Schema name and Password (the default 'scott' and 'tiger' respectively). It looks something like this:
"Provider=MSDAORA 4.0, Server=Self, Username=scott, Password=tiger"
(Server=Self, this is the name of the oracle db sever in my machine).
If it succeeds, it'll open up another form or proceed to some other code fragment. But what happens if the oracle db server needs to be re-installed with a different name (something other than Self) at a later time or the username or password gets changed? I'll have to change the core code again and again. That's what I wanna skip. This portion is kinda foggy to me. Can anybody give me the exact connectionstring?
Nov 5 '07 #1

✓ answered by debasisdas

You need to frame the connection string dynamically at run time by taking value from user input. Let the user enter the username,password and connection string.

Share this Question
Share on Google+
1 Reply


debasisdas
Expert 5K+
P: 8,127
You need to frame the connection string dynamically at run time by taking value from user input. Let the user enter the username,password and connection string.
Nov 6 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.