[thelist] [ASP] Am I locking and Opening correctly?

Casey Crookston casey.crookston at imibevcore.com
Thu Dec 19 11:28:01 CST 2002


--
[ Picked text/plain from multipart/alternative ]
Help!

Here's what I've got (lots of carrage returns to keep lines from
rendering correctly in email):


Dim oConn : Set oConn = Server.CreateObject("ADODB.Connection")

Function openConn()

 'open our connection object

 oConn.Open "DSN=dev_bevcore"

 'set the return value

 If (oConn.State = adStateOpen) Then

  openConn = True

 Else

  openConn = False

 End If '(oConn.State

End Function


Sub closeConn()

 'close our connection object and clean up

 If (oConn.State = adStateOpen) Then oConn.Close

 'Set oConn = Nothing

End Sub



 Call openConn()

 sql = "INSERT INTO PortalLog (UserName, PortalName, PortalStatus,
Reason, LogTime)"

 sql = sql & "VALUES('"& logOnUser &"','Customer Portal', '"&
cusp_status &"','" & cusp_reason & "', #"& timestamp &"#);"

 Call oRs.Open(sql, oConn, adOpenStatic, adLockReadOnly)


 sql1 = "UPDATE PortalStatus SET Status = '"& cusp_status &"' WHERE
PortalName = 'Customer Portal';"

 oConn.Execute sql1   'UP TO HERE THERE'S NO PROBLEM, BUT THIS LINE
RETURNS AN ERROR

 Call closeConn


Error message: Data type mismatch in criteria expression.


Any help would be great.  Thanks,

Casey



More information about the thelist mailing list