Hi
I'm new here and really just starting out on database programming using VB6 and express. Previously I've used Delphi so I'm experiencing transition pains. Here goes anyway!
I've successfully created a basic program connecting to an Access database which allows me to navigate, delete, create records etc. So far so good. (I think it's ADO not DAO but how do I know!!!) Here's the relevant connections.
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\databases\AddressBook.mdb"
Dim con As New OleDb.OleDbConnection
Dim dst As New DataSet
Dim da As OleDb.OleDbDataAdapter
da = New OleDb.OleDbDataAdapter(Sql, con)
Everything works OK with one form. I want to have a new form to do some searches of the table(s) but when I copy over the successful form1 code I get:
NullReferenceException was unhandled
Any advice please about the problem and the best way to set up a connection to a database so I can use that connection through a whole application.
Many thanks in anticipation.
Rod
Enter your message below
Sign in or Join us (it's free).