Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Access remote server oledb database server using windows forms client application
Posted

1 solution

Using an ODBC DSN (Data Source Name) is a two step process.

1) You must first create the DSN via the "ODBC Data Source Administrator" program found in your computer's Control Panel. Make sure to create a SYSTEM DSN (not a USER DSN) when using ASP.

2) Then use the following connection string - with your own DSN name of course.
C#
oConn.Open "DSN=mySystemDSN;" & _ 
           "Uid=myUsername;" & _ 
           "Pwd=myPassword"
 
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