Dataset Query Display

mjenkinson05

Member
Joined
Mar 8, 2007
Messages
13
Programming Experience
Beginner
Before i explain my problem i must state i am a noobie at vb.net so if its a really simple fix them im sorry.

I am making an appointments program, and have a main page with tabs for each of the staff.

on each tab is a datagrid that displays a query (from access) to display only the appointments for that staff member.

My problem is, when a new appointment is added, it doesnt appear in the list, so i figured, ill need to close and open the form again. so when i make the program close and open the form again (with a nice message not to panick the user) i get this error on the datagrid for the staff member with the new appointment.

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Any help would be greatly appreciated.
 
please expand on what you mean by:

"when a new appointment is added, it doesnt appear in the list"
 
sorry, i have a form that adds an appointment into the database. When that has been added, the record in the database is not shown in the datagrid.
 
of course... the datagrid's source datatable is a snapshot of the database at some time before the record is added. it doesnt update in real; time as records are added to the database.. you must do it

I suggest that you use the form to add a row to the datatable, and then update the database from there
 
Back
Top