Just another Perl shrine | |
PerlMonks |
single quote and spaces in where clause of sql queryby prashantktyagi (Scribe) |
on Jun 07, 2012 at 06:11 UTC ( [id://974882]=perlquestion: print w/replies, xml ) | Need Help?? |
prashantktyagi has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have a generic question. I am getting error while executing a query containing spaces and single quote. I know binding value and quote function is the solution, but I want any solution in my current script.My code is like this..
$fs_name has spaces and single quotes. And I am using selectall_arrayref instead of prepare and execute.. like this..
Any help how to do in this scenario. I am getting below error. DBI reported string: "Server returned EXCEPTION: Failed to execute method CallMethod: DBD::ODBC::st execute failed: MicrosoftODBC SQL Server DriverSQL ServerLine 1: Incorrect syntax near 's'. (SQL-42000)
Back to
Seekers of Perl Wisdom
|
|