validate data before dropping into sql table

  • Thread starter Thread starter luna
  • Start date Start date
L

luna

any links for a quick tutorial on checking the contents of data before
dropping into sql ?
i have a text box and if certain characters are input the sql statement
borks - namely characters
like ' " and ; which cant be put into the string
in php i double quoted or converted to chr codes
id imagine its something like check the string and replace - but a quick
tutorial would be lovely!

cheers

mark
 
How are you building your command object? If you use parameters, then it will take care of escaping the necessary characters for you

Tu-Thac

----- luna wrote: ----

any links for a quick tutorial on checking the contents of data befor
dropping into sql
i have a text box and if certain characters are input the sql statemen
borks - namely character
like ' " and ; which cant be put into the strin
in php i double quoted or converted to chr code
id imagine its something like check the string and replace - but a quic
tutorial would be lovely

cheer

mar
 
Back
Top