here is a screenshot of my system.i dont know what is the error i put the code on line 7 correctly.anyone can help? thanx

the line 7 is

con.ConnectionString = "provider = microsoft.jet.oledb.4.0;datasource = ..INVENTORY1.mdb"

Hi,
Connectionstrings.com will allow you to check the connection string but it looks ok to me. Is con an OLEDB connection object? i.e. dim con as new OleDbConnection()

Does the Access file reside at the path specified? Is access installed on the machine?

Sorry if these questions seam basic, you haven't given me much to go on.

It's flagging dt as the problem. It would help to see all code relating to dt including declaration/instantiation.

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.