View Full Version : SQL Error
K.Forsythe
10-08-2003, 01:31 PM
A collection refers to a library, my guess is that it can't find your file "TESTFILE" Try adding the library name, use either "Yourlib.TESTFILE" or "Yourlib/TESTFILE" Depending on the configuration, either could work - so try one then the other. If that doesn't fix it, I'll look at it again. You can email me at kevin.forsythe@dmcconsulting.com Good luck and take care, Kevin
Guest.Visitor
10-09-2003, 04:12 AM
Try using for FIELDS colllection of the recordset object <hr width=50 align=left>Code ('http://www.mcpressonline.com/mc/showcode@@.6ae8082d/2')
ccrow@cronus.cc
10-09-2003, 05:37 AM
I am using VBscript in an ASP with Client Access ODBC to run an SQL on an V5r1 iSeries database file. The Code looks like this: SQLString = "Select FLD1, FLD2, FLD3 from TESTFILE" Set objRS = objConn.Execute(SQLString) Do while not objRs.EOF Response.Write objrs(FLD1) Response.Write objrs(FLD2) Response.Write objrs(FLD3) objRs.movenext Loop The Error I get in my log file is on the first Response.Write statement and is: "800a0cc1|Item_cannot_be_found_in_the_collection_co rresponding_to_the_requested_name_or_ordinal." In another program, I created a new view that worked fine with the following code: CREATE VIEW test1 AS SELECT * FROM TESTFILE Am I reading the error correctly, in that it says FLD1 cannot be found?
ccrow@cronus.cc
10-09-2003, 05:37 AM
That worked, Thanks for everyones help!
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.