Adding data to a database
The answer to this 1 is probably pretty basic. Im trying to add data to a database with VB using adodc connection, but when i created my database originally, some attribute names had spaces in then, i.e. "infra red" was the name of an attribute. How do i add data to this. Ive got
Adodc1.Recordset!infra red = Combo3.Text
but because there is a space VB doesnt like this. And i cant really change the names of the attributes. Does any1 know if there a way round it?
Thanks
Will
Re: Adding data to a database
Try square brackets:
VB Code:
Adodc1.Recordset![infra red] = Combo3.Text
Re: Adding data to a database
Hmm well that seems to have done the trick, thanks a lot for that, however it didnt actually add the item to my database.lol
im sure thats something ive missed so i'll look into it, but it found the attributes ok so cheers pal.
Will
Re: Adding data to a database
Are you doing an edit/update?
Something like this:
VB Code:
Adodc1.Recordset.Edit
'do stuff here
Adodc1.Recordset![infra red] = Combo3.Text
'....
Adodc1.Recordset.Update