Discussion Locked

Adding Data to the database through VB

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
When I add new data the through my vb program, it does not add why?

8 replies

by sl-campbell

Mmmmm, there could be several reasons. How are you trying to add the data? In code or using a DataControl? If in code, are you calling the AddNew method prior to setting the fields and the Update method after setting the fields? Do you have an error handler that is resuming with-out exposing an error?

Please POST a comment to your question for more help and I will get back to you.

by sl-campbell

Are you using the Update method after setting the fields to be changed? Make sure that this is done in order to see changes and before moving to another record. Also, is the recordset of the datacontrol updatable?
Also, make sure you are catchingall errors in this section and not just doing Resume Next somewhere!
Let me know more!

by 3wadman

Chances are you are mixing ADO and DAO record sets. Make sure all your DIM's say
ADODB.Connection
ADODB.Recordset
ADODB.Command
ADODB.Parameter
If it doesn't ask ADO it's DAO, and they don't talk to each other. Also the finally step is always rs.Update

This discussion is closed to new replies.