Click here to Skip to main content
15,911,786 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I used this connection to run my sql query ba it did'nt work and sent this error to me :"Keyword not supported: 'dsn'."
this is my connection:
C#
public static string CnnStr = @"Dsn=Server;uid=kity;app=Microsoft® Visual Studio® 2010;wsid=kity;database=Server;trusted_connection=Yes";

but this connection works to me in my datalist but for my behind code it gives me this error please tell me what is the problem? I should say I used ODBC connection to database
Posted
Updated 14-Oct-11 22:48pm
v3
Comments
DaveAuld 15-Oct-11 4:44am    
What type of database are you connecting to? Have you checked http://www.connectionstrings.com/ ?
kitykity 16-Oct-11 4:36am    
but that solution doesn't work to me because another error comes back to me.
It says Keyword not supported: 'Driver'." instead of dsn
K N R 15-Oct-11 5:08am    
yes i think the above link is very usefull..

thanks dave...
kitykity 16-Oct-11 4:34am    
but that solution doesn't work to me because another error comes back to me.
It says Keyword not supported: 'Driver'." instead of dsn

1 solution

If you follow these steps,then you can find readymade connection string

For connectivity in visual studio 
open Server Explorer
right click add Connection
Follow simple steps
After Creating Connection Right click on Database
Click on properties
In Proprties Connection String will be found.
Copy This String.
 
Share this answer
 

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