datagridview, oledb and update

Joined
Feb 18, 2009
Messages
12
Programming Experience
1-3
hey guys,

i really need your help on this one

i have a vb.net datagrid populated with a dataset. now whenever i add another user and run the .update command i get a weird error, something about output being replicated.. :S

this is the sql update statement that is generated by the command builder:

Code:

UPDATE tblStations SET UidStation = ?, Code = ?, Nom = ?, Description = ?, Telephone = ?, Adresse = ?, UidGroupe = ?, UidGroupe = ? WHERE ((UidStation = ?) AND ((? = 1 AND Code IS NULL) OR (Code = ?)) AND ((? = 1 AND Nom IS NULL) OR (Nom = ?)) AND ((? = 1 AND Description IS NULL) OR (Description = ?)) AND ((? = 1 AND Telephone IS NULL) OR (Telephone = ?)) AND ((? = 1 AND Adresse IS NULL) OR (Adresse = ?)) AND ((? = 1 AND UidGroupe IS NULL) OR (UidGroupe = ?)) AND ((? = 1 AND UidGroupe IS NULL) OR (UidGroupe = ?)))

the tabel structure is pretty simple, field types are in parenthesis:

table:
tblStations

fields:
UidStation (int)
Code (text)
Nom (text)
Description (text)
Telephone (text)
Adresse (text)
UidGroupe (int, foreign key linked to tblGroupes as 1 to many, many stations for 1 group)


table :
tblGroupes

fields:
UidGroupe (int)
Code (text)
Description (text)



one thing i could think of is the fact that i have a combobox column on the grid that is bound to another table and to the datagrid. if you need i can send you the database and the vb project so you can test it urself. :)

also i can change en existing user's combobox choice once and save it to a database. but the next time i try it it gives me a concurrent access violation error (or something like that, hard to translate from french ;) )

any idea what causes it ? i am using VB.Net 2005 with Microsoft Access as database.

Thanks in advance
 
Back
Top