hi, I have two sql strings being executed at the same time one of which is an update statement and the other a save statement. The save statement works but the update statement does not.
Here is the error i am receiving

System.NullReferenceException: Object reference not set to an instance of an object.
   at Albergo.frmCheckIn.saveToDB() in C:\Users\gman\Documents\Visual Studio 2008\Projects\Albergo\Albergo\frmCheckIn.vb:line 98

the code i am using is the one below:

    Using dachk As New OleDb.OleDbDataAdapter(sql2, con)
                        'updating the roomstatus column in the rooms table
                        '////ends here
    End Using
Catch ex As Exception
End Try

i will be greatful for any help

i have replaced the oledb.oledbadapter with oledb.oledbcommand and its working. I still don't understand why but it's working. I guess that's code.

Be a part of the DaniWeb community

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