Problem med Run-Time error '440'

.NET

0 svar · 340 visningar · startad av znyder

Medlem sedan dec. 2002172 inlägg
Trådstart#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.

249 ms totalt · 4 externa anrop · v20260731065814-full.d34c6d5a
121 ms — deklarationer (db)
0 ms — hämta statistik (cache)
125 ms — hämta tråd, inlägg och bilagor (db)
122 ms — ändringar (db)