I am using MS Access 2003 to connect with VB.
I have added all the referencess.
Still there is an error in the line

If conn = "" Then
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Automobiles.mdb;"
conn.Open

Will you please help me to solve this problem?

Recommended Answers

All 2 Replies

You can not have

conn = ""

This should rather read

If conn.State = 0 Then

which checks if your connection is open or closed. 0 = closed, 1 = Open.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.