Potential problem?

Results 1 to 3 of 3

Thread: Potential problem?

  1. #1
    GetRows() Guest

    Default Potential problem?

    Once the array is returned in the getrows().<BR>In order to get required information I use getrows(2,i)<BR>where 2 is the 3rd column. Problem is that if a column is added to the table before 3rd one, then Code will grab wrong information. I tried using getrows(column3namehere,i) but it didnt work. Also tried getrows("column3namehere",i) no luck. If I use the column3namehere I will always be save. Any suggestions?

  2. #2
    Join Date
    Dec 1969

    Default RE: Potential problem?

    That&#039s the problem with GetRows() - you lose all the field name/type information. Basically you need to know exactly what order your fields are going to be recovered in - always specify it in the SELECT clause, never do "SELECT * ..."<BR><BR>Dunc

  3. #3
    GetRows Guest

    Default RE: Potential problem?

    Dun,<BR>I changed the select statement from * to fieldname1, fieldname2<BR>then I got a script out of range error on the getrows(1,i)? So i changed it to getrows(fieldname1,i) and it worked, but my code did not run correctly. It seemed like did not run all the way through from top to bottom? The If statement did not work correctly, but it works fine with the select *...? I&#039m not sure if this part messed up or what.<BR>&#060;%<BR>If not rs.eof and not rs.bof then<BR> getdata = rs.GetRows<BR> icol = UBound(getdata,1)<BR> irow = UBound(getdata,2)<BR>for i =0 to irow<BR> if then<BR> end if<BR><BR>Next<BR>%&#062;

Posting Permissions

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