[ciapug] Adodb -> mssql, grabbing from a result set

Chris Hettinger ciapug@cialug.org
Mon, 15 Dec 2003 10:14:30 -0600


Those that are familiar with ADODB...
=09
	$sql =3D "SELECT LastGenID FROM QTII_UR.dbo.urlastgenid WHERE userid =
=3D 'encwebtools'";
        	$rsCaseID =3D $qtdb->Execute($sql);

>> Succeeds, Returns 1 record with the value '3281608'

        	$caseID =3D $rsCaseID->fields['LastGenID'];

$caseID is empty... Though my select is succeeding the assignment is not =
grabbing the value of the field. I have also tried the assignement like =
this:

	$caseID =3D $rsCaseID->fields[0]; // still nothing.

I have review the Adodb manual, but not sure if I need to do this =
assignment differnet since I am querying a Mssql DB ???

-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.'