Haven't tested your suggestion yet, but just look through it more
carefully now. (Comments follow below).
In general:
The only special thing I can see that you are using in your code,
that I am not using in my stored procedures are transactions - I
think so at least. Except for that I am using all other stuff, and
have no problem with it.
> > So I am curious about this. Would you like to explain this a little bit more
> > in details?
>
> 1) You can not do complex queries. e.g.
> =============8<=============================================================
> begin transaction
>
> set nocount on
>
> declare
> @PerId int
> , @ConId int
> , @DelID int
> , @BilID int
>
> insert into
> table1 (id,Name)
> Values(42,'A Name')
> set @PerId = @@identity
This looks strange, id must be an identity column for this to work,
and since you have not turned on identity insert I assume id is not
an identity column.
> -- other inserts and data manipulation
>
> set nocount off
Why do you turn on row counts just before you return the result?
This might create problems in the receiving end.
> commit
>
> select
> @PerId PersId
> ,@ConId ContId
> ,@BilId BillId
> ,@DelId DeliId
>
> =============8<=============================================================
>
> 2) You sometimes (i.e. not always therefore not reproducible) get a CGI error
>
> if you use header("Location:http://xxx.xxx.xxx.xx") to redirect address
> after a database query, you will sometimes get CGI Error message.
>
> Here is the CGI Error message source code:
>
> =============8<=============================================================
>
> <head><title>Error in CGI Application</title></head>
> <body><h1>CGI Error</h1>The specified CGI application misbehaved by not
> returning a complete set of HTTP headers. The headers it did return
> are:<p><p><pre></pre>
I recognize this error, but I get it in another context, namely when
stderr is not redirect to stdout when I execute a shell command with
popen(). It might be that the SQL server sends an error message form
time to time(?) (would it help to do a "set ansi_warnings off"?)
The other reason why you might get this error is - but I am not 100%
sure about this, since I got it some times when I worked with db calls,
and just fixed the fault but forgot to document the fault it self -
because some of the return values are nulls. You can fix this by
typically doing like this:
SELECT
isnull(@PerdId, -1) PersId,
isnull(...),
etc, etc..
Might be worth to test?
> =============8<=============================================================
>
> I have set up two servers at the same time on the same hardware one never
> showed this the other would sometimes (about 1 in 7 calls). Guess witch one
> was used as the test server and which one was the production server?
:)
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php