I'm having trouble understand why this ERROR keep happening:
Microsoft VBScript runtime error '800a01a8'
Object required: 'objConn'
/admin/newsletters/news_exec.asp, line 341
and, this is my code:
function openDB()
on error resume next
set objConn = server.createobject("adodb.connection")
objConn.Open "Driver={SQL Server};" &_
"Server=SCOTTM;" &_
"Database=testing;" &_
"Uid=matts;" &_
"Pwd=test;"
if err.number <> 0 then
dim msg
msg = "" _
& "<b>Number :</b> " & err.number & "<br><br>" _
& "<b>Page :</b> " & Request.ServerVariables("PATH_INFO") & "<br><br>" _
& "<b>Desc :</b> " & err.Description
response.Redirect "/includes/error.asp?msg=" & msg
end if
on error goto 0
end function
call openDb()
if I < ubound(custList,2) then
mySQL = "UPDATE tblNewsLetters " _
& "SET newsBookmark = '" & custList(0,I) & "' " _
& "WHERE idNews = " & idNews
else
mySQL = "UPDATE tblNewsLetters " _
& "SET newsBookmark = NULL " _
& "WHERE idNews = " & idNews
end if
set rs = objConn.Execute(mySQL)
call closeRS(rs)
call closedb()
Any input would also be helpful, thanks all.
Microsoft VBScript runtime error '800a01a8'
Object required: 'objConn'
/admin/newsletters/news_exec.asp, line 341
and, this is my code:
function openDB()
on error resume next
set objConn = server.createobject("adodb.connection")
objConn.Open "Driver={SQL Server};" &_
"Server=SCOTTM;" &_
"Database=testing;" &_
"Uid=matts;" &_
"Pwd=test;"
if err.number <> 0 then
dim msg
msg = "" _
& "<b>Number :</b> " & err.number & "<br><br>" _
& "<b>Page :</b> " & Request.ServerVariables("PATH_INFO") & "<br><br>" _
& "<b>Desc :</b> " & err.Description
response.Redirect "/includes/error.asp?msg=" & msg
end if
on error goto 0
end function
call openDb()
if I < ubound(custList,2) then
mySQL = "UPDATE tblNewsLetters " _
& "SET newsBookmark = '" & custList(0,I) & "' " _
& "WHERE idNews = " & idNews
else
mySQL = "UPDATE tblNewsLetters " _
& "SET newsBookmark = NULL " _
& "WHERE idNews = " & idNews
end if
set rs = objConn.Execute(mySQL)
call closeRS(rs)
call closedb()
Any input would also be helpful, thanks all.