Asp Error Object Required
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings 800a01a8 object required vbscript and policies of this site About Us Learn more about Stack Overflow
Microsoft Vbscript Runtime Error Object Required
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Vbscript Object Required
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ASP Object required up vote 0 down vote favorite I have the error in Classic ASP: Microsoft VBScript runtime error '800a01a8' Object required: 'SqlStatement' /Data/Database.asp, line 186 The line 186 is: SqlStatement.CommandText = sql. Here is my code: Dim Db, SqlStatement, RS Set Db = Nothing Set SqlStatement = Nothing Set RS = Nothing ' Initialize the database once Private Sub SqlInitDb() If isNull(Db) Or varType(Db) = vbEmpty Or IsObject(Db) = False Then ' Create database connection object Set Db = Server.CreateObject("ADODB.Connection") ' Set connection timeout Db.ConnectionTimeout = Session("ConnectionTimeout") ' Set command timeout Db.CommandTimeout = Session("CommandTimeout") ' Open database Db.Open Session("ConnectionString") End If If isNull(SqlStatement) Or varType(SqlStatement) = vbEmpty Or IsObject(SqlStatement) = False Then ' Create a sql statement Set SqlStatement = Server.CreateObject("ADODB.Command") ' Set opened database as active connection for the SQL statement SqlStatement.ActiveConnection = Db End If End Sub ' Close the database if it is not closed Private Sub SqlClose() If Not isNull(SqlStatement) And varType(SqlStatement) <> vbEmpty And IsObject(SqlStatement) = True Then SqlStatement.ActiveConnection.Close End If Set SqlStatement = Nothing If Not isNull(Db) And varType(Db) <> vbEmpty And IsObject(Db) = True Then For Each objErr In Db.Errors response.write("
") response.write("Description: ") response.write(objErr.Description & "
") response.write("Help context: ") response.write(objErr.HelpContext & "
") response.write("Help file: ") response.write(objErr.HelpFile & "
") response.write("Native error: ") response.write(objErr.NativeError & "
") response.write("Error number: ") response.write(objErr.Number & "
") response.write("Error source: ") response.write(objErr.Source & "
") response.write("SQL state: ") response.write(objErr.SQLState & "
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ASP Classic VB error 800a01a8 object http://stackoverflow.com/questions/15973411/asp-object-required required up vote 1 down vote favorite I am attempting to fix an issue on a company website. The page in question is http://www.srbc.com/SiteMap.asp. I am getting the following error when trying to call a global options file: Microsoft VBScript runtime error '800a01a8' Object required: '' /_Includes/Callout_Global.asp, line 40 And this is the line the error references in the /_Includes/Callout_Global.asp file: rs_main.open "Select TeamID, FirstName + ' http://stackoverflow.com/questions/29901536/asp-classic-vb-error-800a01a8-object-required ' + LastName as FullName from team where Category = 'Attorney' and IsActive = '1' Order by OrderNum" The code controls the dropdown box that should contain a listing of attorney names. This code works just fine on other pages in the site (see for example http://www.srbc.com/Careers/Default.asp). I am not a coder, just trying to cleanup this site a bit. It is pretty dated code, but any suggestions on what I could do to fix this would be appreciated. The coding on the SiteMap.asp page around where this function is called looks like: