|
-
Mar 10th, 2005, 05:33 PM
#1
Thread Starter
New Member
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
-
Mar 10th, 2005, 05:35 PM
#2
Frenzied Member
Re: Adding data to a database
Try square brackets:
VB Code:
Adodc1.Recordset![infra red] = Combo3.Text
-
Mar 10th, 2005, 05:42 PM
#3
Thread Starter
New Member
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
-
Mar 10th, 2005, 05:55 PM
#4
Frenzied Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|