SQL Resultset field order
Posted on 2001-06-08
Here is my SQL:
Qry.SQL = "select A.ABAN8, A.ABMLNM, A.ALADD1, A.ALADD2, A.ALADD3, A.ALADD4, A.ALCTY1, A.ALADDS, A.ALADDZ, C.A5CLMG, B.MAAN8, C.ABALPH, D.ABALPH, D.CAANAME from EDWDATA1.F01901 A, EDWDATA1.F0150 B, EDWDATA1.F01901 C, EDWARDQRY.F550101B D where (A.ABAT1 = 'IP' or A.ABAT1 = 'C') and A.ABAN8 = B.MAPA8 and B.MAOSTP = 'PAY' and B.MAAN8 = C.ABAN8 and C.A5CLMG = D.BROKER order by B.MAAN8, A.ABAN8"
To access the result set values I use:
doc.CustomerNumber = Res.GetValue(1)
doc.BrokerNumber = Res.GetValue(2)
doc.PersonName = Res.GetValue(14)
My question is I want to add a new field but I don't want to have to realign all the code. I want to add a 15th value. It's confusing to know which order each field will be in especially since there are three files I'm reading from. I want my new field A.xyzfield to show up as the last value or Res.GetValue(15). How should I structure the HTML?