1

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

3
  • 2
    Did you try connectionstrings.com ? Commented Feb 28, 2011 at 10:42
  • Ya but i am not getting the exact one Commented Feb 28, 2011 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. Commented Feb 28, 2011 at 11:04

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

Comments

0

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.

4 Comments

but when i use that it says dsn is not a keyword.whats wrong with it?
Is this when you try to connect via code? Could you post it on here in that case?
string consql = "Dsn=databse;uid=sa;pwd=wtl@123!;" The error which i get is below Keyword not supported: 'dsn'
Can you post the rest of it? Particularly the connection class you are using.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.