80020009 -- ready for a tough one?

M

middletree

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?
 
M

middletree

Ray at said:

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top