|
Post by votan on Aug 14, 2008 10:31:45 GMT -5
I need to modify a table and set the columns by using strings... so likeSQLaction$ = "update settings set colname$ = '";b$(ugh);"'" but the "colname$" causes an error.. already tried all sorts of bracketing etc.... and also tried to find it on the net, but couldn't find a solution yet. Maybe someone of you guys knows how to do the syntax right, so that the colname$ is accepted?
And what is the easiest way to get the number of columns from a table returned as a value.... and how to know what data-type a column is?
|
|
|
Post by Carl Gundel - admin on Aug 14, 2008 10:55:01 GMT -5
Try this: SQLaction$ = "update settings set "; colname$; " = '";b$(ugh);"'" Or presuming you need single quotes around the column name: SQLaction$ = "update settings set '"; colname$; "' = '";b$(ugh);"'" I need to modify a table and set the columns by using strings... so like SQLaction$ = "update settings set colname$ = '";b$(ugh);"'" but the "colname$" causes an error.. already tried all sorts of bracketing etc.... and also tried to find it on the net, but couldn't find a solution yet. Maybe someone of you guys knows how to do the syntax right, so that the colname$ is accepted? And what is the easiest way to get the number of columns from a table returned as a value.... and how to know what data-type a column is?
|
|
|
Post by votan on Aug 14, 2008 15:58:18 GMT -5
Thanks, that's it!
|
|
|
Post by StefanPendl on Aug 14, 2008 16:23:59 GMT -5
Generally, all variables must be put outside of the quotation marks.
"..."; variable; "..." or "..."; variable$; "..."
That's the way all BASIC dialects work.
|
|