getrows trouble

Results 1 to 2 of 2

Thread: getrows trouble

  1. #1
    Join Date
    Dec 1969

    Default getrows trouble

    i&#039;m using getrows and I want to pull only a few select columns. when i use a getrows() to pull everything, it&#039;s fine. however, when i use a getrows(,,array("table1","table2"), it says "Item cannot be found in the collection corresponding to the requested name or ordinal."<BR><BR>i&#039;ve verified and triple checked that all the column names do exist within the mentioned table.<BR><BR>any suggestions? <BR><BR>here&#039;s the code<BR><BR>&#060;%<BR>&#039;variables<BR>dim id<BR>dim where,table,tbls<BR>dim objRS,objConn,Conn<BR>id = request.querystring("id")<BR><BR> if id = "" then<BR> response.redirect("fmSchedule.asp")<BR> end if<BR><BR><BR>&#039;variables and function to pull from database<BR><BR>where = "tbl_city.stateID = " & id & " AND tbl_city.cityID = AND tbl_class.classID = tbl_schedule.classID"<BR>table = "tbl_city,tbl_class,tbl_schedule"<BR>call SelectAll(table,"*",where,"tbl_city.cityname,tbl_s chedule.classDate",NULL)<BR><BR>&#039;getrows<BR>D im aTable1Values<BR>&#039;this one worked<BR>&#039;aTable1Values = objRS.GetRows()<BR><BR>&#039;this one doesn&#039;t<BR> aTable1Values = objRS.GetRows(,,Array("tbl_class.classID","tbl_cla ss.location","tbl_class.street","tbl_class.phoneNu mber"))<BR>Dim iRowLoop, iColLoop<BR>For iRowLoop = 0 to UBound(aTable1Values, 2)<BR> For iColLoop = 0 to UBound(aTable1Values, 1)<BR> Response.Write(aTable1Values(iColLoop, iRowLoop) & "<BR>")<BR> Next &#039;iColLoop<BR><BR> Response.Write("&#060;p&#062;")<BR>Next &#039;iRowLoop<BR> <BR>%&#062;<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: getrows trouble

    Omit the table prefix.<BR><BR>aTable1Values = objRS.GetRows(,,Array("classID","location","street ","phoneNumber"))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts