Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing MSAccess2k w/out DSN

Status
Not open for further replies.

codestorm

Programmer
Apr 11, 2001
504
AU
Hopefully a simple one.
I have a experiment site with access to .Net and can use MS Access 2000 databases (Brinkster), but can't for the life of me figure out how to connect to the database using the new .Net ADO/OLEDB stuff.

All the MSDN examples appear to be for SQL Server DBs.

How to do it?

(whatever happened to good old dbq=server.mappath...)
codestorm
Fire bad. Tree pretty. - Buffy
Hey, I'm operating on a limited mental budget here.
<insert witticism here>
 
(Spoken in William Shatner voice)You could use something other than sql server as your database....but why?!
;)

I found this code snippit:

Dim strConnection As String = _
&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; _
& &quot;C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb&quot;
Dim cn As OleDbConnection = New OleDbConnection(strConnection)
cn.Open( )

its pretty much identical to the sql service way of doing things, except you use the oledb namespace classes insted of the sql client ones.

Here's a link to the site I got the above code from:

Hope it helped
:)

Jack
 
Your example is pretty much exactly what I've tried, and the current error is:

Could not find installable ISAM.

This is bit concerning, as my guess is it means something's not set up on the server to allow this kinda access.
codestorm
Fire bad. Tree pretty. - Buffy
Hey, I'm operating on a limited mental budget here.
<insert witticism here>
 
I'm using a free hosting ISP so I don't have any control over the server (can't even setup a DSN or anything).
codestorm
Fire bad. Tree pretty. - Buffy
Hey, I'm operating on a limited mental budget here.
<insert witticism here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top