Re: SQL Server Query Failed
| From: | david | Date: | Wed, 17 Mar 2004 19:00:26 +0000 |
| Subject: | Re: SQL Server Query Failed | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33489@lists.php.net to get a copy of this message | ||
Bob:
Is this case, PhaseFK is an integer. However, it will fail on character
fields as well.
Thanks!
david
"Robert Twitty" <rtwitty@neutron.ushmm.org> wrote in message
news:Pine.GSO.4.44.0403171223280.14075-100000@neutron...
> What type of field is PhaseFK?
>
> -- bob
>
> On Wed, 17 Mar 2004, david wrote:
>
> > Hello there!
> >
> > I have just about driven myself crazy with an odd intermittent problem.
> >
> > I have an intranet site, a good size one at that, on a Windows 2000
Server,
> > running Apache, connecting to another Windows 2000 Server running SQL
Server
> > 2000. It all works just peachy, and life is good.
> >
> > But (there is always a "but").
> >
> > Now and then, I get a "Query Failed" message. I cannot find the source
of
> > the problem, no matter how hard I try. I can't even find an error
message,
> > which is really odd.
> >
> > The query looks like this (it is a dynamic query, so it can change):
> > SELECT PhaseFK FROM Facts WHERE (CategoryFK=5)
> >
> > The message I get back looks like this:
> > Warning: mssql_query(): Query failed in runsql.php on line 10
> >
> > I tried looking at the following to get an error message:
> > mssql_query("SELECT @@ERROR as ErrorCode"); (it returns nothing)
> > mssql_get_last_message (it returns nothing, OR, sometimes it tells me
that
> > it changed the database context)
> >
> > What I think might be going on (because it ONLY happens with certain
tables)
> > is that the table is locked (there are some external processes that work
> > with this table, which fire off more or less randomly from my code's
point
> > of view) or is other unavailable for some reason which eludes me. But I
> > can't seem to figure out how to tell if this is the case or not.
> >
> > It seems to me that if I get a "Query Failed" then somewhere lurks an
error
> > code, and thus I can trap it nicely, instead of simply failing (that
bugs me
> > from a user point of view).
> >
> > Any thoughts?
> > Thanks!
> > david
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>