Skip to Content.
Sympa Menu

freetds - RE: [freetds] Query failing when following a insert

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Chris Hettinger" <chettinger AT encompas.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Query failing when following a insert
  • Date: Mon, 15 Dec 2003 14:11:22 -0600

And additional environment variable... I am using the ADODB Abstraction layer.

I did another test which included 2 SELECTs, 2 INSERTS, 1 SELECT...

After the initial Insert, whatever follows it fails. I suspect that the DB
connection needs to be closed before I do my next query... However the way I
handle my DB connection is in such a way that once the sql is executed and
either a result set or FALSE is returned, the connection is closed
automatically.

-ch

-----Original Message-----
From: Chris Hettinger
Sent: Monday, December 15, 2003 1:59 PM
To: FreeTDS AT lists.ibiblio.org
Subject: [freetds] Query failing when following a insert


Hello,

I am running into an issue that I can not explain and I think it may point to
TDS as the issue, I hope not, so hopefully someone here can help.

My environment:
Apache / PHP on Mdk 9.1 Linux.
PHP has been compilied with the db driver and TDS library
Connecting to a MS SQL 7 db.

I have a script that initially does a insert into a table in the mssql db,
immediately after the insert I need to identify the ID that was generated and
used on that record so I query the same table where some of the details match
and grab the id... However the second sql execution fails. It returns no
records.

To test this I did another test where I do a insert and immediately after
that I do a select from a different table within a differnet database all
together, and it also fails, returning no records.

If I need to clarify or this issue sounds familiar I would appreciate any
feedback.

-Chris Hettinger, Web Specialist
-IFMC/ENCOMPASS
-www.encompas.com
-(515) 279-8730



CONFIDENTIALITY NOTICE: This communication, including any attachment, may
contain confidential information and is intended only for the individual or
entity to whom it is addressed. Any review, dissemination, or copying of
this communication by anyone other than the intended recipient is strictly
prohibited. If you are not the intended recipient, please contact the sender
by reply email, delete and destroy all copies of the original message.'

_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


CONFIDENTIALITY NOTICE: This communication, including any attachment, may
contain confidential information and is intended only for the individual or
entity to whom it is addressed. Any review, dissemination, or copying of
this communication by anyone other than the intended recipient is strictly
prohibited. If you are not the intended recipient, please contact the sender
by reply email, delete and destroy all copies of the original message.'





Archive powered by MHonArc 2.6.24.

Top of Page