Referencing query results

VSLucky

New Member
Here is the code : <BR><BR>set objRS1 = server.CreateObject ("ADODB.recordset")<BR><BR>objRS1.Open "select count(C.field1)from dcdata C, CHMEMBERS M where M.Member_ID='MyMenberID'and M.Member_Client=C.field7 " , objDC, adOpenForwardOnly, adLockOptimistic<BR><BR><BR>________________________________________________<BR><BR>Here is the question how do I reference the value returned<BR><BR>objRS1("count(C.field1)") does not work<BR>objRS1("C.field1") does not work<BR>objRS1("field1") does not work<BR>objRS1("count(field1)") does not work<BR><BR><BR>any ideas<BR><BR>For those interested this is the soloution : <BR><BR>objRS1.Open "select count(C.field1) as fieldCount from dcdata C, CHMEMBERS M where M.Member_ID='0005589'and M.Member_Client=C.field7 " , objDC, adOpenForwardOnly, adLockOptimistic<BR><BR>Response.Write objRS1("fieldCount")<BR>
 
Back
Top