[ciapug] Adodb -> mssql, grabbing from a result set
Chris Hettinger
ciapug@cialug.org
Mon, 15 Dec 2003 13:01:01 -0600
If I take the LastGenID and break it out to it's own page, to test it... =
it works. And I included the var_dump
$tmp =3D $rsCaseID->GetAssoc();
var_dump($tmp);
here is the output:
bool(false)=20
-----Original Message-----
From: Lathrop Preston [mailto:laith@prestonfam.org]
Sent: Monday, December 15, 2003 12:35 PM
To: ciapug@cialug.org
Subject: Re: [ciapug] Adodb -> mssql, grabbing from a result set
Chris Hettinger wrote:
> 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);
>=20
>=20
>>>Succeeds, Returns 1 record with the value '3281608'
>=20
>=20
> $caseID =3D $rsCaseID->fields['LastGenID'];
>=20
> $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:
>=20
> $caseID =3D $rsCaseID->fields[0]; // still nothing.
>=20
> I have review the Adodb manual, but not sure if I need to do this =
assignment differnet since I am querying a Mssql DB ???
Try accessing the value as $rsCaseID->Fields('LastGenID');
I have noticed that sometimes for no apparent reason Fields() will work=20
but fields[] will not and the reverse.
you might also try doing the following
$tmp =3D $rsCaseID->GetAssoc();
var_dump($tmp);
to see if maybe there is a case sensitivity issue with mssql
Laith
_______________________________________________
ciapug mailing list
ciapug@cialug.org
http://cialug.org/mailman/listinfo/ciapug
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.'