webForumDet fria alternativet

Problem med Run-Time error '440'

0 svar · 321 visningar · startad av znyder

znyderMedlem sedan dec. 2002172 inlägg
#1

Jag håller på med ett auktionsprogram.
Det ska kolla igenom utgående auktioner och meddela vinnaren.

MEN!

Ibland funkar det smärtfritt och det skickas utan problem.. men ibland står det:

Run-Time Error '440':
Operations are not allowed when the object is closed.

Vad menas med det?
Jag testar med samma auktion... ibland funkar det ibland inte...

Någon som vet vart man ska börja kolla?

Detta är koden som triggar själva felmeddelandet..

If bidders("bid") >= rst("reservation") Then

Set end_a = con.Execute("select * from members where id=" & bidders("user_id") & "")

Set poSendMail = New vbSendMail.clsSendMail
poSendMail.SMTPHost = "mailout.comhem.se"
poSendMail.From = "pay@pbay.se"
poSendMail.FromDisplayName = "PBAY"
poSendMail.Recipient = "pontusholm@comhem.se"
poSendMail.ReplyToAddress = "pontusholm@comhem.se"
poSendMail.Subject = "Du vann auction med reservationspris!"
poSendMail.Message = "This is a test"
poSendMail.Send
Set poSendMail = Nothing
Set end_a = Nothing

Set end_a = con.Execute("insert into won_ids(auction_ID, typ_auction, user_ID, feedback_ID, feedback, datum) VALUES(" & rst("ID") & ", 1, " & rst("user_ID") & ", " & bidders("user_ID") & ", 0, '" & Now & "') ")
Set end_a = Nothing
Set end_a = con.Execute("insert into won_ids(auction_ID, typ_auction, user_ID, feedback_ID, feedback, datum) VALUES(" & rst("ID") & ", 2, " & bidders("user_ID") & ", " & rst("user_ID") & ", 0, '" & Now & "') ")
Set end_a = Nothing
Set end_a = con.Execute("update auctions set sold=1 WHERE ID=" & rst("id") & "")
Set end_a = Nothing

End If

Tacksam för hjälp.

134 ms totalt · 3 externa anrop · v20260731065814-full.30151723
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
131 ms — hämta tråd, inlägg och bilagor (db)