This code works:
But the same code (i.e. Dimensions) fails after running the first result set (Stops - which works) shown as here:
If I reverse them - i.e. run Dimensions first, that works but then Stops fails. I tried putting in conn.FreeResult() but that has no effect. I also tried renaming the 2nd result set using rs2 but that doesn't help either.
Seems to be some kind of bug. Any ideas out there on a workaround?
Code:
''Select Dimensions records ''------------------------------- SQL_Select = "SELECT * FROM Dimensions WHERE LDDIM_ID = :Load_id" flag = conn.execute(SQL_Select, args) vText = conn.callResult.text rs = conn.ResultSet rowFlag = rs.nextRow() while rowFlag vDim_Id = rs.data("DIM_ID") vText = xbDupeDims(conn,args,vDim_Id,vNewLoad_Id) rowFlag = rs.nextRow() end while
Code:
''Select Stops records ''------------------------------- SQL_Select = "SELECT * FROM Stops WHERE LDSTP_ID = :Load_id" flag = conn.execute(SQL_Select, args) vText = conn.callResult.text rs = conn.ResultSet rowFlag = rs.nextRow() while rowFlag vStop_Id = rs.data("STP_ID") vText = xbDupeStops(conn,args,vStop_Id,vNewLoad_Id) rowFlag = rs.nextRow() end while ''Select Dimensions records ''------------------------------- SQL_Select = "SELECT * FROM Dimensions WHERE LDDIM_ID = :Load_id" flag = conn.execute(SQL_Select, args) vText = conn.callResult.text rs = conn.ResultSet rowFlag = rs.nextRow() while rowFlag vDim_Id = rs.data("DIM_ID") vText = xbDupeDims(conn,args,vDim_Id,vNewLoad_Id) rowFlag = rs.nextRow() end while
Seems to be some kind of bug. Any ideas out there on a workaround?
Comment