asp.net - converting an sql statement w/qoutation marks from vbscript to c# - microsoft full text indexing -


i have 2 sql statements query (microsoft full text indexing) written asp classic site. contain quotation marks , visual studio in c# not accept them way are.

i need change variable myvalue @myvalue not know qoutation marks needed (or @ since c# doesn't accept) or how format use c#. example, keep , not keep or change etc.

select * thistable ft_tbl  inner join containstable(thistable, searchindex, '""" & myform & "*""', 50) key_tbl  on ft_tbl.id = key_tbl.[key]  tropic='current'  order key_tbl.rank desc  select * thistable ft_tbl  inner join freetexttable(thistable, searchindex, '" & myform & "', 50) key_tbl  on ft_tbl.id = key_tbl.[key]  tropic='current'  order key_tbl.rank desc 

something this...assuming want parameterize instead of continuing practice of sql injection inherited.

select * thistable ft_tbl  inner join freetexttable(thistable, searchindex, @myform, 50) key_tbl  on ft_tbl.id = key_tbl.[key]  tropic='current'  order key_tbl.rank desc 

you need make string. , add parameter sql command.


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -