paulie 0 Newbie Poster

Easy. Import System.Data.OLEDB, then connect with this code:


Dim sAccessConn AsString = "
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Northwind.mdb;Jet OLEDBDatabase Password=YourPasswordIfNeeded"

Dim oAccessConn As OleDbConnection = New OleDbConnection(sAccessConn)

Dim cmdAccess As New OleDbCommand("Select * from Whatever", oAccessConn)

Dim adoAccessReader As OleDbDataReader = cmdAccess.ExecuteReader

adoAccessReader.Read()

If adoAccessReader.HasRows Then
'Do Stuff
End If

adoAccessReader.Close()

If oAccessConn.State = ConnectionState.Open Then
oAccessConn.Close()
End If

how to connect vb.net with ms assess

paulie 0 Newbie Poster

To add to this question, this is even weirder: If I remote into the target PC (using Remote Desktop) and look in the C:\windows\assembly folder, the Crystal entries are NOT there in the GAC. BUT, if I map to that PC's C drive and navigate to the GAC, the Crystal entries show up! What's up with that???

Hi Folks,

I have a VB 2005 app (2.0 Framework) that I've published out to one of our fileservers in our company, so users can download/install and run it. It published fine, but when I go to install it on another PC (which I'm logged into with Admin rights), I get this error:

SYSTEM UPDATE REQUIRED <-- in Title BarUnable to install or run the application. The application requires that assembly CrystalDecisions.CrystalReports.Engine Version 10.2.3600.0 be installed in the Global Assembly Cache (GAC) first.Two strange things here: one, the CR file is already in the GAC, and two, I'm not using CR in the app. All the CR files are in the References list which must be a default because I didn't set it.

Oh, one other strange thing: If I remove the Unused References in my app, the CR references go away. I thought that would be the fix. BUT, when I try to run the App in the IDE now that I've removed Unused References, VB2005 crashes and doesn't give the reason!
:?:

It just says that something strange happened and I might lose my work. Oy.

Any ideas?

Thanks …

paulie 0 Newbie Poster

Hi,

You need to specify OLEDB in your connection string.

Here's Microsoft's native OLE DB provider:

Public Const ORACLE_MS_OLEDB_CONNECT As String = "Provider=msdaora; Data Source="

That's for connecting to Oracle. The best source for connection strings is:

http://www.connectionstrings.com/

paulie 0 Newbie Poster

Hi Folks,

I have a VB 2005 app (2.0 Framework) that I've published out to one of our fileservers in our company, so users can download/install and run it. It published fine, but when I go to install it on another PC (which I'm logged into with Admin rights), I get this error:

SYSTEM UPDATE REQUIRED <-- in Title Bar
Unable to install or run the application. The application requires that assembly CrystalDecisions.CrystalReports.Engine Version 10.2.3600.0 be installed in the Global Assembly Cache (GAC) first.
Two strange things here: one, the CR file is already in the GAC, and two, I'm not using CR in the app. All the CR files are in the References list which must be a default because I didn't set it.

Oh, one other strange thing: If I remove the Unused References in my app, the CR references go away. I thought that would be the fix. BUT, when I try to run the App in the IDE now that I've removed Unused References, VB2005 crashes and doesn't give the reason!
:?:

It just says that something strange happened and I might lose my work. Oy.

Any ideas?

Thanks in Advance.