PC Review


Reply
Thread Tools Rate Thread

Connection String for .MDB

 
 
jayuya
Guest
Posts: n/a
 
      25th Aug 2003
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...

Thanks,
jayuya

 
Reply With Quote
 
 
 
 
William Ryan
Guest
Posts: n/a
 
      25th Aug 2003
http://www.connectionstrings.com

This is a pretty killer site for connection
strings.....YOu can use ODBC or you can use OLEdb, it's up
to you.

Good Luck,

Bill

W.G. Ryan
(E-Mail Removed)
>-----Original Message-----
>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...
>
>Thanks,
>jayuya
>
>.
>

 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      25th Aug 2003
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)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a connection object (sql/oledb/odbc) based on connection method/string. Hetal Microsoft VB .NET 2 30th Apr 2007 06:55 PM
Query String or Connection String with Regex jwgoerlich@gmail.com Microsoft C# .NET 3 11th Jan 2007 10:55 AM
Connection String question - accessing one string throughout solut =?Utf-8?B?Z2FyeSBnLg==?= Microsoft Dot NET 2 26th Apr 2006 07:48 PM
Connection String object Convert to String Variable Type =?Utf-8?B?TWlrZSBNb29yZQ==?= Microsoft ASP .NET 2 26th Oct 2004 04:43 PM
connection string exception : Format of the initialization string does not conform to specification starting at index 0 Gaurav Microsoft ASP .NET 0 7th Nov 2003 11:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:55 PM.