数组的赋值问题
da.Fill(ds)Dim PicIP(),RoadNo As String
For i = 0 To ds.Tables(0).Rows.Count - 1
PicIP(i) = ds.Tables(0).Rows(i)(0).ToString.Trim()
RoadNo(i) = ds.Tables(0).Rows(i)(1).ToString.Trim()
Response.Write(PicIP(i))
Response.Write("<br>")
Response.Write(RoadNo(i))
Response.Write("<br>")
Next
Response.End
总是出错说“未将对象引用设置到对象的实例”
但是如果我改为:
Dim PicIP,RoadNo As String
PicIP = ds.Tables(0).Rows(i)(0).ToString.Trim()
RoadNo = ds.Tables(0).Rows(i)(1).ToString.Trim()
就会正常运行为什么?请大家指教多谢!