Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,
I am trying to connect the remote database (using ORACLE10G).

connection string,
C#
OracleConnection con = new OracleConnection("Server=server1;Database=mcweb;User ID=SYSADM;Password=SYSADM;");

the above lines i have been used in my project. while i run my application i am getting the following error message

"Keyword not supported: 'database'."

is there any solution for my problem to make db connection

regards,

sasi
Posted
Updated 26-Jul-11 23:49pm
v4

[Edit]
I didn't quite catch that OP was explicitely asking for SQL Server 2005. I'll still leave this solution here, because I think a link to the source for connection strings is always a benefit. :)
[/Edit]

There is an absolutely great source for connection strings to all kinds of RDBMSs. www.connectionstrings.com. Oracle RDMBS is handled on the same site: http://www.connectionstrings.com/oracle[^].

Best Regards,
—MRB
 
Share this answer
 
v3
Comments
Abhinav S 26-Jul-11 14:52pm    
After OP's correction, your answer is much better. 5.
Manfred Rudolf Bihy 26-Jul-11 14:54pm    
Instead of adding to the confusion and reediting my solution I'll just leave it as it is right now. :)
Thanks Abhinav!
ramuksasi 26-Jul-11 14:59pm    
Thank you so much friends.. i got better solution from u.. thanks alot...
Abhinav and Manfred are both right, there is something odd with your code / description.
However there is an easy way to find out what a working connection string is: in VS, open the Server Explorer pane, and highlight the database you are interested in. The Properties pane will include the Connection String, which you can Select, then Copy'n'Paste into your app or configuration settings.
 
Share this answer
 
Comments
Manfred Rudolf Bihy 26-Jul-11 14:55pm    
Nice hint! 5+
ramuksasi 26-Jul-11 14:58pm    
Thank you so much friends..
i got better solution from u..
thanks alot...
OracleConnection with SQL Server 2005?
Something obviously seems to be wrong, you need to check with those who gave you this code.
Or starting converting some of this code to work with SQL Server.
 
Share this answer
 
Comments
Manfred Rudolf Bihy 26-Jul-11 14:50pm    
My 5!
ramuksasi 26-Jul-11 14:50pm    
really sorry abhinav.. There is small changes in that code. now Updated my problem properly...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900