PHP calling Stored Proc on MS-SQL 7 params being missinterpreted as dates
Nick Brandon
nbrandon at hotmail.com
Fri Jun 21 09:39:31 EDT 2002
Not too sure if this would help, but the PHP manual suggests using
mssql_init for stored procedures.
http://www.php.net/manual/en/function.mssql-init.php
HTH
Nick
> Hi there,
>
> I am using mssql_* in PHP on my linux box to talk to our MS-SQL server via
> freetds. No problems with SELECT statements but when I try to use stored
> procedures with parameters I get problems. The scripts work on my windows
> machine but fail on the Linux server.
>
> $res = mssql_query("EXEC ap_rpt_r0013_0a @Item='EFD3343'");
>
> I have also tried:
> $res = mssql_query("EXEC ap_rpt_r0013_0a 'EFD3343'");
>
> Error Message:
> Warning: Sybase error: The conversion of a char data type to a datetime
> data type resulted in an out-of-range datetime value. (severity 16) in
> /www/reports.priv/htdocs/general/R0013.php on line 129
>
> With ver 7.0
>
> and
>
> ver 4.2 returns no rows.
>
> I have been using
>
> SuSE Linux 7.2 and 8.0
> PHP 4.2.1
> freetds 0.53
> Apache 1.3.24
> MS-SQL 7.0 on NT4
>
> Help..! thanks
>
> Trevor
More information about the FreeTDS
mailing list