RE: [PHP-DB] MS SQL 'Changed database context' error
| From: | Robert Twitty | Date: | Fri, 20 Feb 2004 03:38:50 +0000 |
| Subject: | RE: [PHP-DB] MS SQL 'Changed database context' error | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33039@lists.php.net to get a copy of this message | ||
Hi Michael
Yes, I am the developer of ODBTP, and changing the database context will
not cause a problem.
-- bob
On Thu, 19 Feb 2004, Michael Flanagan wrote:
> Hi Robert,
>
> I've seen your name on a few of the ODBTP posts. You're one of the
> developers of same, yes? Are you familiar with the 'Changed database
> context' message? Do you know for sure that ODBTP handles that correctly?
>
> Thanks.
>
> Michael
>
> -----Original Message-----
> From: Robert Twitty [mailto:rtwitty@neutron.ushmm.org]
> Sent: Thursday, February 19, 2004 5:38 PM
> To: Michael Flanagan
> Cc: php-db@lists.php.net
> Subject: RE: [PHP-DB] MS SQL 'Changed database context' error
>
>
> Hi Michael
>
> You might get better results using the odbtp extension with support for
> the mssql functions. Since you are using Windows, use
> php_odbtp_mssql.dll instead of php_mssql.dll.
>
> -- bob
>
> On Thu, 19 Feb 2004, Michael Flanagan wrote:
>
> > Adam, Thanks for the suggestions. I don't want to ignore all error
> > handling. Later, I might get an error that I really don't want php to
> > swallow due to either of your suggestions.
> >
> > Has anyone else run into this and solved it?
> >
> > Any idea why the following lines in the php.ini file don't work?
> > mssql.min_error_severity = 11
> > mssql.min_message_severity = 11
> >
> > Michael
> >
> > -----Original Message-----
> > From: Adam Voigt [mailto:adam@kotisprop.com]
> > Sent: Thursday, February 19, 2004 12:44 PM
> > To: Michael Flanagan
> > Cc: php-db@lists.php.net
> > Subject: RE: [PHP-DB] MS SQL 'Changed database context' error
> >
> >
> > Try putting the error suppressor (@) before the query, eg:
> >
> > @mssql_query
> >
> > Or, try setting the error reporting:
> >
> > error_reporting(0);
> >
> >
> >
> > On Thu, 2004-02-19 at 14:38, Michael Flanagan wrote:
> > > Thanks, Adam.
> > >
> > > I don't get the error in Enterprise manager. MS has a KB article out
> that
> > > says that this message is informational. I seem to remember that the
> > > article also says the message comes out some times, and not other times,
> > but
> > > that you should just forget it.
> > >
> > > The particular SELECT statement I'm getting the message on is the second
> > > query in my script. The other query is to the same db; in fact, it uses
> > the
> > > exact same $db connection object.
> > >
> > > Any ideas on getting PHP to ignore this info message?
> > >
> > > Thanks again.
> > > Michael
> > >
> > > -----Original Message-----
> > > From: Adam Voigt [mailto:adam@kotisprop.com]
> > > Sent: Thursday, February 19, 2004 12:13 PM
> > > To: Michael Flanagan
> > > Cc: php-db@lists.php.net
> > > Subject: Re: [PHP-DB] MS SQL 'Changed database context' error
> > >
> > >
> > > This may not be the case, but I've seen this before when the PHP library
> > > didn't know how to express MS SQL's error, so it simply returns the last
> > > message sent which was the informational context change. If it is infact
> > > an error, you should be able to plug the query directly into Enterprise
> > > Manager to see MS SQL's take on the problem, so to speak. =)
> > >
> > > But again, this is all just in my past experience's, yours may differ
> > > greatly.
> > >
> > >
> > >
> > > On Thu, 2004-02-19 at 14:08, Michael Flanagan wrote:
> > > > I'm getting the error "Changed database context" from MS SQL. I
> > > > see
> > > > where this is supposedly just an informational message. I've tried
> > > > setting
> > > >
> > > > mssql.min_error_severity = 11
> > > > mssql.min_message_severity = 11
> > > >
> > > > but to no avail. What am I missing? I don't mind the message so
> much,
> > > > but php treats this as an error, and doesn't execute my query.
> > > >
> > > > I'm running php 4.3.3 for Windows; the SQL Server and web server are
> on
> > > the
> > > > same machine. I'm using PEAR:DB for the database access.
> > > >
> > > > Thanks.
> > > >
> > > > Michael Flanagan
> > > > voice: (1) 303-674-2691
> > > > fax: (1) 603-963-0704 (note '603' area code)
> > > > mailto:mflanagan@MJFlanagan.com
> > > --
> > >
> > > Adam Voigt
> > > adam@kotisprop.com
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > --
> >
> > Adam Voigt
> > adam@kotisprop.com
> >
> > --
> > 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
>
>