receiving error:Microsoft VBScript runtime error '800a01a8'

I am getting the error Microsoft VBScript runtime  error '800a01a8' Object required: '' /service.standards/edit.asp, line 72
when i tri to insert an update on a table. can someone if possible explain to me what i may be doing wrong?

thank you so much..

ticketnumber = trim(Request("ID"))


<td class="body"><input type="text" name="ticketnumber" value="<%=ticketnumber%>" readonly/></td>

If request.form("Submit") = "Update" then
    if IsDate(sdate) then
        conn.execute("update tblServiceStandards set Action_Taken=Action_Taken+'"&vbcrlf&Request.Form("datecompleted") & "'+' " & Action_Taken & "' where ticketnumber="& ticketnumber &";")    <<<this is line 72
itortuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

WMIFCommented:
try writing out the sql statement to see what it looks like.  it sounds like one of the variables isnt giving a value as expected.

    if IsDate(sdate) then
response.write ("update tblServiceStandards set Action_Taken=Action_Taken+'"&vbcrlf&Request.Form("datecompleted") & "'+' " & Action_Taken & "' where ticketnumber="& ticketnumber &";")
response.end()
        conn.execute("update tblServiceStandards set Action_Taken=Action_Taken+'"&vbcrlf&Request.Form("datecompleted") & "'+' " & Action_Taken & "' where ticketnumber="& ticketnumber &";")
alorentzCommented:
>>Object required:

This would basically mean that conn is not an object, nor an open connection.

You need to do this first:

set conn = server.createobject("ADODB.Connection")
conn.open "some connection string to your database"
kiddangerCommented:
The 'set' keyword is required to create an object in VBScript.
Server.CreateObject uses MTS.  If you're not using MTS, just use CreateObject
Always delimit the string concatenator & with spaces.  If you ever have an & followed by an h, it will be seen as a hex value.  It also makes you're code easier to read.
When asking for help with databases, especially when referencing dates, knowing the database and version is helpful.  ' and ' are used around SQL dates.  # and # are used around MS Access dates.

I don't understand why you want a CRLF in the update.
It's better to cleanse your data and assign it to a variable before using it in a dynamic SQL statement.
It's also better to use parameterized queries or stored procedures for numerous reasons.

dim conn, dateCompleted
dateCompleted = Server.HTMLEncode(Request.Form("datecompleted"))
if IsDate(dateCompleted) then
  set conn = CreateObject("ADODB.Connection")
  conn.Execute("UPDATE tblServiceStandards SET Action_Taken = Action_Taken + '" & vbCrLf & dateCompleted & "' + ' " & Action_Taken & "' WHERE ticketnumber = " & ticketnumber & ";")
  conn.Close
  set conn = nothing
else
  ' invalid date
  ' inform user
end if

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

itortuAuthor Commented:
i was wondering if i can ask one more question in regards to this page. I hope it's ok.
 
i'm trying to change the update statement:

conn.Execute("UPDATE tblServiceStandards SET Action_Taken = Action_Taken + '" & vbCrLf & dateCompleted & "' + ' " & Action_Taken & "' WHERE ticketnumber = " & ticketnumber & ";")

to this form:

Sub saveVariables

opencon
sql = "SELECT * FROM tblServiceStandards WHERE ticketnumber =" & ticketnumber
set RS = Server.CreateObject("ADODB.Recordset")
RS.Open sql, connectme, 1, 3

if rs.bof = true and rs.eof = true then
    response.write ("Record not found!")
else
    do until rs.eof = true
    if IsDate(dateCompleted) then
        Rs.Fields("fldDate") = sfldDate
        Rs.Fields("Reported_By").value = sReported_By
        Rs.Fields("Severity").value = sSeverity
        Rs.Fields("Duration").value = sDuration
        Rs.Fields("Status").value = sStatus
        Rs.Fields("ServicesAffectedID").value = sServicesAffectedID
        Rs.Fields("Problem_Description").value = sProblem_Description
        Rs.Fields("Assigned_To").value = sAssigned_To
        Rs.Fields("Action_Taken").value = "Action_Taken + '" & vbcrlf & dateCompleted & " ' + ' "  &  sAction_Taken  &  " ' "
        rs.UpdateBatch adAffectAll
    exit do
    end if
    rs.movenext
    Loop
end if
closecon
End Sub

all i get an error that says: "The function expects a string as input"  line 213
Rs.Fields("Action_Taken").value = "Action_Taken + '" & vbcrlf & dateCompleted & " ' + ' "  &  sAction_Taken  &  " ' "     << line 213
i am would lie to be able to insert/append into the frs field Äction_Taken the values dateCmpleted, and sAction_Taken which is appended to whatever contents are already on the field.

can i be advise on how do i need to change this line, so all these values are inserted? thanks for all you help. it is very much appreciated. please tell me if increasing the poin value is neccesary.

regards.

itortu.
WMIFCommented:
why dont you finish your originaly question before asking a new one?

you might want to read through this FAQ here too:
http://www.experts-exchange.com/help.jsp#hi107
itortuAuthor Commented:
thank you i will read it.

i am closing this question now.

thank you very much again.

sincerely,

itortu.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.