Hi there, I tried posting this to the newsgroup yesterday, but it doesn't look like it worked - sorry if it shows up twice.
I'm running PHP 4.2.2 under Win2K/IIS and trying to run a stored proc in MSSQL2000 (SP2) on the same server. Exactly the same script works fine from Linux/Apache using FreeTDS, but won't work from the Win2K. I can connect (verified from Profiler), but the mssql_query() returns the following error: Warning: MS SQL message: Cannot insert the value NULL into column 'height', table 'tempdb.dbo.#LimitTable_____________________________________________________ ____________________________________________________000100000014'; column does not allow nulls. INSERT fails. (severity 16) in e:\Inetpub\wwwroot\canaryislands-golf.com\common\classes\etbsqltemplate.inc on line 42. The same stored proc runs fine from Query Analyser. I've noticed a couple of strange things using Profiler. When the Linux box connects (or Query Analyser), it issues the following statements: -- network protocol: TCP/IP set quoted_identifier on set implicit_transactions off set cursor_close_on_commit off set ansi_warnings on set ansi_padding on set ansi_nulls on set concat_null_yields_null on set language us_english set dateformat mdy set datefirst 7 The PHP connection differs, and I think that's what's causing the problems: -- network protocol: TCP/IP set quoted_identifier off set implicit_transactions off set cursor_close_on_commit off set ansi_warnings off set ansi_padding off set ansi_nulls off set concat_null_yields_null off set language us_english set dateformat mdy set datefirst 7 Does anyone know how to change the ansi_* and concat_null_yields_null set statements that are issued when PHP connects? Or am I on the wrong track? Regards, Matt