Can not connect to Access 2003 DB via Jet.Oledb.4

G

Guest

I have a VB .Net Windows application that accesses an Access Database using
ADO.Net OleDB .Net Data provider. Users are running Windows XP with the .Net
Framework installed. It works fine on user's PC who have MS Access
installed. However, when I distribute this to a user who does not have MS
Access installed, the program cannot open the connection. The database and
the executable are on the same machine and I install the Access 2003 runtime
on the client machine.

The Access database contains tables only. The users will not access the
database directly. All IO is done thru the VB.Net application.I have a
license to distribute Access runtime, but do not want to do so if all I need
to do is set a reference to Jet (or some other dll) so that the required
files are included in the installation package. Is there some reference I
should set before deploying?

Here is my connection string:
Private cnn As New
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=..\data\AssetMgr.MDB;Jet OLEDB:Database Password=pwdclient;")
Here is how I use it:
Dim da As New OleDb.OleDbDataAdapter(sSQL, cnn)Try da.Fill(ds,
sTableName) Return TrueCatch ex As Exception Return False Throw ex
End Try

enak
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top