Q:

ADODB.Field error '800a0bcd' Classic ASP

I have an error in the nsql part inside the if pgset in the code below.

      un = Ns(0) 'Error Here'

How can I solve this problem?
help...
sQuery = "select * from cash where mode=1 order by id desc"
Set oRs = Dbcon.execute(sQuery)
Set Rs = Dbcon.execute(sQuery)

If Not(oRs.Eof Or oRs.Bof) then
    arrTmp = oRs.GetRows() 
        msg = ""        '로우를가져옴
else
    msg = "신청 내역이 없습니다."            '로우를가져옴
End if

If IsArray(arrTmp) Then
    pg1 = page - 1
    pg = pg1 * 20
    pgset = UBound(arrTmp, 2) - pg

    if pgset < 20 then
    For i=pg To UBound(arrTmp, 2)   '로우수만큼 for문 실행
        idx = arrTmp(7, i)
        value = FormatNumber(CDbl(arrTmp(1, i))/100,0)  
        requested = arrTmp(2, i)
        step = arrTmp(3, i) 
        uid = arrTmp(4, i)  
        uname = arrTmp(5, i)    
        uacc = arrTmp(6, i) 

        nsql = "select username from users where id = " & uid
        Set Ns = Dbcon.execute(nsql)
        un = Ns(0) 'Error Here'

        if step = "1" then
            steps = "<b style=""color:red;"">신청</b>"
        else if step = "2" then
            steps = "<b style=""color:black;"">완료</b>"
        else if step = "3" then
            steps = "<b style=""color:red;"">거절</b>"
        else
            steps = "Error"
        end if
        end if
        end if

        idxchkf = "<th><input type=""checkbox"" name=""chk_uid"" value=""" & idx & """></th>"
        idxf = "<th>" & i+1 & "</th>"
        uidf = "<th><input type=""text"" name=""uidx"" style=""width:100%;text-align:center;"" value=""" & uid & """ readonly></th>"
        unf = "<th>" & un & "</th>"
        uaccf = "<th>" & uacc & "</th>"
        valuef = "<th>" & value & "</th>"
        timef = "<th>" & requested & "</th>"
        stepf = "<th>" & steps & "</th>"
        self = "<th><input type=""radio"" name=""csh_info"" value=""1"">완료&nbsp;&nbsp;<input type=""radio"" name=""csh_info"" value=""2"">거절</th>"

        response.write "<tr>" & idxf & unf & valuef & uaccf & timef & stepf & "</tr>"

        Set Ns = Nothing

A:

this usually indicates that there is no data being returned from the recordset. you should do a check on the data returned before setting the variable:
if not Ns.BOF and not Ns.EOF then un = Ns(0)

