Asp Error Description 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 and policies of this site About Us Learn more about 800a01a8 object required vbscript Stack Overflow the company Business Learn more about hiring developers or posting ads with
Object Required Error In Classic Asp
us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is microsoft vbscript runtime error object required a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up VBScript Object Required When Trying to set DateTime up vote -1 down vote favorite I am new to VBScript and can't figure out why I'm getting an Object Required error with my code. It's very simple right now, I've just begun it: <% set fs=Server.CreateObject("Scripting.FileSystemObject") Dim dateandtime On Error Resume Next set dateandtime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") If Err <> 0 Then ' File operation(s) failed, handle the error response.write(Err.Description) End If %> Why am I not able to set the DateTime? I've set the FileSystemObject for use later in the code FYI. I'm just putting it all in here so you see exactly what I have. I figure it's a simple syntax thing but I can't seem to find the answer anywhere. Thanks for your help! vbscript asp-classic share|improve this question asked May 14 '14 at 4:40 MillerMedia 1,083104090 possible duplicate of "Object required" when using Set in an assignment –Lankymart May 14 '14 at 8:35 1 Same issue use of Set on data types that are not objects (in VBScript). Also use of .Net syntax DateTime.Now.ToString() should be Now() for Classic ASP equivalent or a custom date format. See Answer to Classic ASP - Format current date and time. –Lankymart May 14 '14 at 8:38 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote accepted The first mistake is to use Set when assigning a non-object to a variable. The last entry in the 'Related' list “Object required” when using Set in an assignment deals with it. >> Set dt = "a string" >> Error Number: 424 Error Description: Object required [because Set wants an object to assign] No Set, no problem: >> dt = "a string" >> WScript.Echo dt >> a string Removing
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 required up vote 1 down vote http://stackoverflow.com/questions/23645754/vbscript-object-required-when-trying-to-set-datetime 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 + ' ' + LastName as FullName from team where http://stackoverflow.com/questions/29901536/asp-classic-vb-error-800a01a8-object-required 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: