On Mon, 25 Aug 2003 10:59:41 -0700, "jayuya" <(E-Mail Removed)> wrote:
¤ Can anyone point me to a link or give me a sample for a
¤ connection string using DSN=??
¤
¤ Do I need to install ODBC for .NET???
¤
¤ this is the one that I normally use in my development
¤ computer
¤
¤ Const ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data
¤ Source=C:\Database\myApp.mdb;User ID=???;Password=????;"
¤
¤ But my hosting will setup a DSN and i have not done it
¤ that way in my sample application...
If you absolutely need to use a DSN then you will need the ODBC .NET managed provider:
HOW TO: Use the ODBC .NET Managed Provider in Visual Basic .NET and Connection Strings
http://support.microsoft.com/default...b;en-us;310985
However, using a DSN means using ODBC and you may encounter problems using ODBC and Jet. Using the
OLEDB .NET managed provider is the preferred method:
Dim ConnectionString As String
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\My Documents\db1.mdb"
Dim AccessConn As New System.Data.OleDb.OleDbConnection(ConnectionString)
AccessConn.Open()
Paul ~~~
(E-Mail Removed)
Microsoft MVP (Visual Basic)