Hi,
I'm working on an ASP Jscript page run on IIS 5. However i got a very strange problem:
The code is like this
The Response.Write write out: undefined------
But if i move this line up 1 or more line: before the rs("SupplierNam e"), it can write out the correct value.
I also try to write all the column in numeric order before doing anything to the recordset, this work perfectly fine, and list all the column with value correctly.
I think it has something to do with the order we call the recordset field.
Anyone have any idea why this happen?
Thanks
I'm working on an ASP Jscript page run on IIS 5. However i got a very strange problem:
The code is like this
Code:
var rs = getPaymentDetail(pId);//Get the ADODB record set
this.paymentId = pId;
this.agreementId = String(rs("AgreementId"));
this.supplierId = String(rs("SupplierId"));
this.supplierName = String(rs("SupplierName"));
Response.Write(rs.Fields(10).Value+"----");
But if i move this line up 1 or more line: before the rs("SupplierNam e"), it can write out the correct value.
I also try to write all the column in numeric order before doing anything to the recordset, this work perfectly fine, and list all the column with value correctly.
Code:
for (var i=0; i<rs.Fields.Count; i++)
Response.Write(i+" "+rs.Fields(i).Name+" "+rs.Fields(i).Value+"<br />");
Anyone have any idea why this happen?
Thanks
Comment