Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a system DSN.How to connect to the database in asp.net using DSN.I wanted the Connection String

share|improve this question
2  
Did you try connectionstrings.com ? –  Fredrik Mörk Feb 28 '11 at 10:42
    
Ya but i am not getting the exact one –  user628347 Feb 28 '11 at 10:44
    
use connectionstring to obtain the connectionstring and put them in web.config. intialize them in code and open the connection. were are you got problem. ASP.NET website have many video on them. you can watch any for learn. –  user605334 Feb 28 '11 at 11:04
add comment

2 Answers

up vote 1 down vote accepted

Check out the link , has both DSN and DSN less ODBC connectivity using ADO.Net http://www.easysoft.com/developer/languages/csharp/ado-net-odbc.html

share|improve this answer
    
@user628347: How about if you vote as useful answer? :-) –  Amit Ranjan Mar 3 '11 at 9:46
add comment

One way of finding out the connection string is to create a connection in Server Explorer in Visual Studio, then check the properties of the connection and you will see a Connection String property that will give you what you need.

share|improve this answer
    
but when i use that it says dsn is not a keyword.whats wrong with it? –  user628347 Feb 28 '11 at 10:47
    
Is this when you try to connect via code? Could you post it on here in that case? –  Mantorok Feb 28 '11 at 10:50
    
string consql = "Dsn=databse;uid=sa;pwd=wtl@123!;" The error which i get is below Keyword not supported: 'dsn' –  user628347 Feb 28 '11 at 10:57
    
Can you post the rest of it? Particularly the connection class you are using. –  Mantorok Feb 28 '11 at 11:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.