80020009 -- ready for a tough one?

Discussion in 'ASP General' started by middletree, Jan 9, 2004.

  1. middletree

    middletree Guest

    On my dev machine, on which I test, I have essentially the client, db, and
    web server on machine. I started getting an error today that I just don't
    get.
    ===========
    Error Type:
    (0x80020009)
    Exception occurred.
    /DisplaySortableTickets.asp, line 982
    Page:
    GET /DisplaySortableTickets.asp

    ================

    Now, here's the kicker: I haven't made any changes to this page at all.
    None. Nor the database, the machine, the RAM, didn't install any new
    software, nothing. And since it's my machine, I am sure that nobody else
    has, either. Still, I get this error, on two different pages, and there is
    similar code on both, which the line number points to:

    ====================
    Set rsHistory = Server.CreateObject("ADODB.Recordset")
    strSQL = "SELECT EmployeeID,TIMESTMP,BriefDesc AS HistBriefDesc,LongDesc AS
    HistLongDesc,InternalDesc AS HistInternalDesc,Status AS
    HistStatus,EmailSentTo, ActionItem,Source,Contact_CustID "
    strSQL = strSQL & "FROM TKT_History "
    strSQL = strSQL & "WHERE TicketID = '"&strTicketID&"' "
    'to skip showing the first history item, which should be entered when ticket
    is created
    strSQL = strSQL & "AND BriefDesc <> 'Initial Entry' "
    strSQL = strSQL & "ORDER BY TIMESTMP ASC "
    rsHistory.Open strSQL, objConnection,1,1

    If not rsHistory.eof then
    %>
    <tr>
    <td bgcolor="#999999" colspan="5"><span class="celltitle">Work
    History:</span></td>
    </tr>
    <%
    Do Until rsHistory.EOF

    strEmployeeID = rsHistory("EmployeeID")
    strTIMESTMP = rsHistory("TIMESTMP")
    strHistBriefDesc = rsHistory("HistBriefDesc")
    strHistLongDesc = rsHistory("HistLongDesc")
    strHistInternalDesc = rsHistory("HistInternalDesc")
    strHistStatus = rsHistory("HistStatus")
    strEmailSentTo = rsHistory("EmailSentTo")
    strActionItem = rsHistory("ActionItem")
    strHSource = rsHistory("Source")
    strHistCust = rsHistory("Contact_CustID")
    if strHistCust <> "" then
    Set RSHistCust = Server.CreateObject("ADODB.Recordset")
    If strHSource = "E" then
    strSQL = "SELECT FirstName, LastName FROM Contact "
    strSQL = strSQL & "WHERE ContactID = '"&strHistCust&"' "
    RSHistCust.Open strSQL, objConnection,1,1
    strHistCustName = RSHistCust("FirstName")&" "&RSHistCust("LastName")
    (the last line above is line 981)
    ====================

    FWIW, I am using SQL Server 2000.

    Of course, I went to the MS KB, and didn't really find anything that seemed
    to apply to my case. I also went to www.aspfaq.com, and looked at several
    things, but most of them didn't seem to apply, either. The one that might
    contain my answer was http://www.aspfaq.com/show.asp?id=2188

    At the top of that page, it says to:
    --avoid using SELECT * -- I didn't have that problem
    --Assign the value of the column to a variable IMMEDIATELY, and only use
    this variable from that point on -- I did this already
    --Make sure your MDAC drivers are most current --- I don't know how to do
    this, but seriously, how could this code work for weeks or months and then
    the MDAC start becoming a problem?
    --check out a couple of MS KB articles. I checked them out, not sure how
    they apply to my situation, unless I am missing something.

    I'm not sure what a blob is (is that the image, or binary datatype?)
    But the fields it points to are the First name and Last name fields, and
    those are both Varchars, size 50.

    In my testing around, I also changed from Post to Get, and that didn't make
    a difference.
    I also did a response.write of the SQL command, then ran it in SQL Server,
    and it ran just fine, producing exactly one row.

    I am rebooting the machine right now. Can anyone help me track this down?
    middletree, Jan 9, 2004
    #1
    1. Advertising

  2. middletree

    middletree Guest

    middletree, Jan 9, 2004
    #2
    1. Advertising

  3. middletree

    Ray at Guest

    Check out these two articles.
    http://support.microsoft.com/?kbid=175239
    http://support.microsoft.com/?kbid=200124


    Also, it definitely wouldn't hurt if you changed that line to:

    strHistCustName = RSHistCust.Fields.Item("Firstname").Value & " " &
    RSHistCust.Fields.Item("LastName").Value

    It also wouldn't hurt to response.write each of those values individually to
    see if they have any contents and also check for null values.

    Ray at work



    "middletree" <> wrote in message
    news:%...
    > On my dev machine, on which I test, I have essentially the client, db, and
    > web server on machine. I started getting an error today that I just don't
    > get.
    > ===========
    > Error Type:
    > (0x80020009)
    > Exception occurred.
    > /DisplaySortableTickets.asp, line 982
    > Page:
    > GET /DisplaySortableTickets.asp
    >
    > ================
    >


    > strHistCustName = RSHistCust("FirstName")&"

    "&RSHistCust("LastName")
    > (the last line above is line 981)
    > ====================
    >
    Ray at, Jan 9, 2004
    #3
  4. middletree

    middletree Guest

    Never mind. Turned out to be bad test data.
    middletree, Jan 9, 2004
    #4
  5. middletree

    middletree Guest

    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:...
    > Check out these two articles.
    > http://support.microsoft.com/?kbid=175239
    > http://support.microsoft.com/?kbid=200124


    Yes, those were the KB articles I mentioned in my first thread. I didn't say
    them by name, but they were at the top of this page:
    http://www.aspfaq.com/show.asp?id=2188, so I thought it was self-evident.

    > Also, it definitely wouldn't hurt if you changed that line to:
    >
    > strHistCustName = RSHistCust.Fields.Item("Firstname").Value & " " &
    > RSHistCust.Fields.Item("LastName").Value


    What's the difference? I've not seen the Value part before.

    >
    > It also wouldn't hurt to response.write each of those values individually

    to
    > see if they have any contents and also check for null values.
    >


    Yes, I did all those things. Good to remind me, though.

    Anyway, thanks. I don't know if you read my other post, but I solved it. I
    had allowed a dropdown to not get selected, which should have provided the
    value on which the SQL query depended. I fixed it.
    middletree, Jan 9, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. olivier Micheli

    ADODB.Field error '80020009

    olivier Micheli, Aug 15, 2003, in forum: ASP General
    Replies:
    0
    Views:
    196
    olivier Micheli
    Aug 15, 2003
  2. Marco

    exception '80020009'

    Marco, Feb 14, 2004, in forum: ASP General
    Replies:
    1
    Views:
    109
    Bob Barrows
    Feb 14, 2004
  3. psaban

    error '80020009' Exception occurred

    psaban, Jun 10, 2004, in forum: ASP General
    Replies:
    0
    Views:
    148
    psaban
    Jun 10, 2004
  4. M Naeem Baig

    ADSI 80020009 Error on windows 2003

    M Naeem Baig, Jun 14, 2004, in forum: ASP General
    Replies:
    0
    Views:
    200
    M Naeem Baig
    Jun 14, 2004
  5. Mark

    80020009 errors everywhere

    Mark, Jul 12, 2004, in forum: ASP General
    Replies:
    5
    Views:
    172
Loading...

Share This Page