Re: Re: SQL Server Query Failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David

There does not appear to be any reason why you are having problems. Try
using the odbtp/mssql hybrid extension at http://odbtp.sourceforge.net.
It uses Microsoft's ODBC driver for SQL Server. The mssql extension on
Windows uses DB-Library, which Microsoft stop supporting after SQL Server
6.5. If you use php_odbtp_mssql.dll instead of php_mssql.dll and read
http://odbtp.sourceforge.net/phpext.html#mssql, you should not have to
modify your script(s).

-- bob

On Wed, 17 Mar 2004, david wrote:

> Bob:
>
> Is this case, PhaseFK is an integer. However, it will fail on character
> fields as well.
>
> Thanks!
>
> david
>
> "Robert Twitty" <rtwitty@xxxxxxxxxxxxxxxxx> wrote in message
> news:Pine.GSO.4.44.0403171223280.14075-100000@xxxxxxxxxx
> > 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
> >
> >
>
> --
> 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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux