Thank you for your reply.

i can't tell if your solution works yet because
PHP can't seem to handle multiple SQL statments in one call to 
mssql_query().
when i do what you said:

mssql_query("SET TEXTSIZE 2048 select inventory from products where code = 
'FCA13'");

I get:

Warning: Supplied argument is not a valid MS SQL-result resource in 
utils.php on line 50

AND, from then on, no mssql_*() functions work....

Warning: MS SQL: Unable to select database: PRODDB in utils.php on line 48

Warning: MS SQL: Query failed in utils.php on line 50

Warning: Supplied argument is not a valid MS SQL-result resource in 
testms.php on line 72


i thought maybe it was a different incarnation of the same problem, but now 
i REALLY don't think so.  It turns out when i do any query with mutliple 
statements in it (even if i don't use the result set for something), it 
causes the same thing.  all mssql_*() functions are rendered disfunctional.  
even something that doesn't access data in teh DB, like:

mssql_query("declare @P1 float \n set @P1 = 10.00 \n select @P1");

i get the "not a valid MS SQL-result resource" error.

Sorry to just give out more problems, but anyone know anything about this.  
is there a setting i can change to make multiple statements OK for PHP?  I 
know the statements run just fine on the SQL server, because i ran MSSQL 
Profiler on the server to catch all statments and errors, and no errors 
happened.....

thanks once again, everyone.

jerome


>From: "Mullin, Reginald" <[EMAIL PROTECTED]>
>To: 'Jerome Houston' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: RE: MSSQL 2000's 'real' type kills php
>Date: Tue, 14 May 2002 12:19:47 -0400
>
>Jerome,
>
>I'd had a similar problem a few weeks ago (see
>http://marc.theaimsgroup.com/?l=php-general&m=101960285228542&w=2).
>
>Try modifying your SQL statement like so:
>mssql_query("SET TEXTSIZE 2048 select inventory from products where code =
>'FCA13'");
>
>
>O      From Now 'Till Then,
>\->    Reginald Alex Mullin
>/\      212-894-1690
>
> > -----Original Message-----
> > From:       Jerome Houston [SMTP:[EMAIL PROTECTED]]
> > Sent:       Monday, May 13, 2002 8:52 PM
> > To: [EMAIL PROTECTED]
> > Subject:    MSSQL 2000's 'real' type kills php
> >
> > Hi,
> >
> > i'm working on a win2k server running php 4.1.1  accessing MSSQL server
> > 2000
> > on a win2k server.
> >
> > i've got a problem with a table that has 'real' numbers in it.
> >
> > <database snippet>
> > code    inventory     name
> > PRC01   2.33          Prince Brand Chips
> > FCA13   9.9999934E-2  Frozen Calamari
> > </database snippet>
> >
> > when i
> > mssql_query("select * from products");
> > or, more specifically
> > mssql_query("select inventory from products where code = 'FCA13'");
> >
> > BOOM!  php crashes, and i get a pop-up window in MSIE that says, "IE
> > cannot
> > open the site ......  the connection with the server was reset"
> >
> > but
> >
> > mssql_query("select * from products where code = 'PRC01'");
> > works like a charm.....
> >
> > granted 9.9999934E-2 isn't an actual number for inventory, it should be
> > 0.10
> > .  BUT, i can't help that.  my application is not the only one that uses
> > this data.
> >
> > this happens with various numbers that have high precision.
> >
> > anyone run into this before?  any suggestions?
> >
> > thanks VERY much in advance,
> >
> > jerome
> >
> > _________________________________________________________________
> > Send and receive Hotmail on your mobile device: http://mobile.msn.com
> >
>
>
>**********************************************************************
>This email and any files transmitted with it are confidential and
>intended solely for the use of the individual or entity to whom they
>are addressed. If you have received this email in error please notify
>the postmaster at [EMAIL PROTECTED]
>
>
>www.sothebys.com
>**********************************************************************
>


_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to