Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL server fields access problem

Status
Not open for further replies.

atferraz

Technical User
Aug 23, 2003
129
0
0
PT
The error is:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/Projecto/teste/Default_Teste.asp, line 36
-----------------------------------------------------------the code is:
.................
Set rs = Lig.Execute(SQLstm)
while not rs.EOF
Response.Write &quot;<TR>&quot;
Response.Write &quot;<TD>&quot;
Response.Write rs.Fields (&quot;NUSER&quot;) --->>(line 36)
Response.Write &quot;</TD>&quot;
Response.Write &quot;<TR>&quot;
wend
........
-------------------------------------------
those fields are there and have some data in it.
 
You are missing rs.MoveNext before Wend.
 
The error you are getting is because the field you are trying to print isn't found in the resultset. Check the SQL statement to make sure you are getting the field NUSER. Make sure the field name is spelled correctly, etc.
Since you did not include the SQL statement, I can't tell exactly what is happening with it.
Also, just FYI, you can use rs(&quot;NUSER&quot;) instead of having to use rs.Fields(&quot;NUSER&quot;).


 
Jesus man you are so right. thanks LV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top