dim name as string="jacky"
select * from TABLE where user=name
it won't doing,Can a variable used in SQL select command,if can,how to make it working.You can, but you are missing some basic insights here ...
You can do this like this:
string sql = "Select * from TABLE where user = '" + name + "'"
OR use a stringbuilder of so ...
If you are using SQL Server or any decent DBMS, try using stored procedures instead|||Thank you very much!
No comments:
Post a Comment