can anyone show me how to reference tables in an sql query with a variable?
eg SELECT * FROM varTable
i dont know the syntax ;p
thanx
Printable View
can anyone show me how to reference tables in an sql query with a variable?
eg SELECT * FROM varTable
i dont know the syntax ;p
thanx
strSQL = "SELECT * FROM " & varTable & ";"
i tried ...
rsTemp.Open "DELETE * FROM "InputData";",
gconnMedAidBrowser, adOpenStatic, adLockOptimistic
but it no work :p
is there another way?
You wrote that wrong:
VB Code:
rsTemp.Open "DELETE * FROM " & InputData, gconnMedAidBrowser, adOpenStatic, adLockOptimistic
i didnt see the SQL statement as one long string...
i was seeing it as being processed one word at a time....
thanks for the realization
btw : cute frog Ö
*blushes* Thx :)
Guys according to standard
DELETE * FROM tablename --- is not good
Rather use
DELETE FROM tablename
There are some rdbms where the 1st statement even does not run....