Syntax error or access violation, SQL state 37000. MSSQL though ODBC from PHP -
i'm trying execute stored procedure in ms sql database using following php:
$query = "{call dbo.storedproc('functionname', $date, 'id"; $resultset = odbc_prepare($connection, $query); odbc_execute($resultset, array()); odbc_result_all($resultset); the same stored procedure works fine different function, , results selected date ($date @searchstr):
(eventstart >= @searchstr , eventstart < dateadd(dd,1,@searchstr)) however, when run code, errors without giving specific hints what's causing error. when query run in management studio, results returned correctly.
sql error: [microsoft][odbc sql server driver]syntax error or access violation, sql state 37000 in sqlprepare in ... what's causing query error? odbc bug?
thanks in advance, will
the query seems missing ')} @ end.
Comments
Post a Comment