Asp Vbscript Class Syntax Error
Contents |
Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join vbscript syntax error sub Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange >
Vbscript Syntax Error 800a03ea
Questions > Strange Syntax error on a VBScript Class definition Want to Advertise Here? Solved Strange Syntax error on a VBScript Class definition vbscript runtime error Posted on 2006-11-01 ASP 1 Verified Solution 4 Comments 626 Views Last Modified: 2012-06-21 I am having problems with a class definition in VBScript. I am getting a syntax error for no apparent reason. This is the code that vbscript compiler gives the error: Class FastString Dim stringArray,growthRate,numItems Private Sub Class_Initialize() growthRate = 50: numItems = 0 ReDim stringArray(growthRate) End Sub Public Sub Append(ByVal strValue) ' Next line will prevent type mismatch errors if item is null. Performance hit is negligible strValue=strValue & "" If numItems > UBound(stringArray) Then ReDim Preserve stringArray(UBound(stringArray) + growthRate) stringArray(numItems) = strValue:numItems = numItems + 1 End Sub Public Sub Reset Erase stringArray
Javascript Syntax Error
Class_Initialize End Sub Public Function concat() Redim Preserve stringArray(numItems) concat = Join(stringArray, "") End Function End Class As I said I don't see what is wrong with this. However I get a Syntax Error from this the "Class FastString" line. Now this is code that has been used before without such an error, so I'm baffled. Please Help 0 Question by:thedwalker Facebook Twitter LinkedIn Google LVL 58 Best Solution byamit_g The code is fine. Make sure that this code is not put in incorrect place like in between a if...end if block or function... end function or another class.... end class. Go to Solution 4 Comments LVL 12 Overall: Level 12 ASP 5 Message Expert Comment by:Preece2006-11-01 Do you need () after: Public Sub Reset Preece 0 LVL 58 Overall: Level 58 ASP 25 Message Accepted Solution by:amit_g2006-11-01 The code is fine. Make sure that this code is not put in incorrect place like in between a if...end if block or function... end function or another class.... end class. 0 LVL 1 Overall: Level 1 ASP 1 Message Author Comment by:thedwalker2006-11-01 Would it matter if this is included in a file that is in an if...end if statement? 0 LVL 58 Overall: Level 58 ASP 25 Message Expert Comment by:amit_g2006-11-01 Yes. You can't do that. The include files are included before any
+ Ask a Question Need help? Post your question and get tips & solutions from a community of 418,430 IT Pros & Developers. It's quick & easy. Weird VBScript Syntax error in an ASP visual basic syntax error page -> '800a03ea' P: n/a NanQuan I'm hoping someone can help me solve this error vba syntax error since I am at a total loss here. Usually I don't bother posting on any forums or groups on the internet and prefer
Syntax Error In Vb
to solve stuff myself but this is a total mistery. I have a function inside an ASP page as a result of which I get the following error message: Microsoft VBScript compilation error '800a03ea' Syntax error /admin/dev/Order/process.asp, https://www.experts-exchange.com/questions/22045303/Strange-Syntax-error-on-a-VBScript-Class-definition.html line 160 Function heenEncode(string) ^ I developed this function in a seperate ASP page and it worked with no problems what so ever. However when I finished developing it and proceeded to implement it in my another ASP page I suddenly got this weird error suggesting that there's something wrong with my syntax. Here is the function: <% Function heenEncode(string) x = Len(string) y = Len(string) a = 1 Set d = Server.CreateObject("Scripting.Dictionary") Do While x>0 https://bytes.com/topic/asp-classic/answers/59609-weird-vbscript-syntax-error-asp-page-800a03ea T = heen(Mid(string,a,1)) d.Add x, T a = a + 1 x = x - 1 Loop Do While y>0 TT = TT + d.Item(y) y = y - 1 Loop Set d = Nothing heenEncode = TT End Function Function heen(letter) dim ArHeb,ArEng ArHeb =Array("à","á","â","ã","ä","å","æ","ç","è","é","ë" ,"ì","î","ð","ñ","ò","ô","ö","÷","ø","ù","ú","õ"," ê","ó","ï","í") ArEng =Array("a","b","c","d","e","f","g","h","i","j","k" ,"l","m","n","o","p","q","r","s","t","u","v","w"," x","y","z","@") x = 26 Do While (x > -1) If letter = ArHeb(x) Then letterT = ArEng(x) End If x = x - 1 Loop If letterT = "" Then heen = letter Else heen = letterT End If End Function %> The 2nd function is a part of the first function, but it's not defined within the first function so please don't start suggesting that as a possible cause for the problem, plus it worked fine on a seperate ASP page just as it is. Any help would be greatly appreciated, since I read through some of the posts here regarding this error, but I couldn't find any solution that will work for my specific situation. Thanks!! Jul 19 '05 #1 Post Reply Share this Question 5 Replies P: n/a Chris Barber I put it into VB 6.0 and it complained about the use of 'string' as a variable name - it's a reserved word of course as the definition of a datatype. Change it. Chris. "NanQuan"
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 http://stackoverflow.com/questions/13124389/asp-vb-compilation-error-800a03ea Us Learn more about Stack Overflow the company Business Learn more about hiring http://forums.devx.com/showthread.php?171542-syntax-error-from-function-in-include-file 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 vb compilation error 800A03EA up syntax error vote 0 down vote favorite i'm not an ASP guy but i've inherited an asp project recently. my task is pretty much to skin it up and make all the functionality built over the last 10 years simply work better visually and experientially for the user. so far so good until today. i'm getting the following error message: Microsoft VBScript compilation error '800a03ea' Syntax error /test/calsearchmember.asp, vbscript syntax error line 3 if ((Request.Form("dateToToggle").Item >=0) && (Request.Form("dateToToggle").Item<=31)) ---------------------------------------------^ i have copied the site into a test directory and have been making changes there. this calendar search function works fine on the main site, but not here in the subdirectory and i hadn't changed anything to the file producing the error. any ideas? thanks! i wanted to share some more of the code itself to help paint a better picture of the problem. here's how the file is called: and here is the first bit of code (in which the error is being flagged): <% if ((Request.Form("dateToToggle").Item >=0) && (Request.Form("dateToToggle").Item<=31)) { var sql; var date = Request.Form("calsearchmonth") + "/" + Request.Form("dateToToggle") + "/" + Request.Form("calsearchyear") if (Request.Form("bNewStateOpen").Item == "true") { sql = "SELECT * FROM OpenDates WHERE MemberId = "; sql += Request.Form("calsearchmember"); sql += " AND DateValue(OpenDate) = DateValue('"; sql += date; sql += "') AND TimeValue(OpenDate) = "; if (Request.Form("calsearchPM").Item == "1") sql += "TimeValue('12:00:00 PM')"; else sql += "''"; //Response.Write(sql); var rs = db.Execute(sql); if (rs.EOF) { sql = "INSERT INTO OpenDates (MemberId, OpenDate) VALUES (" sql += Request.Form("calsearchmember").Item sql += ", '" sql += date; if (Request.Form("calsearchPM").Item == "1"
syntax error from function in include file If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 2 of 2 Thread: syntax error from function in include file Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 03-20-2009,01:09 PM #1 larryy@indiana. View Profile View Forum Posts Registered User Join Date Mar 2009 Posts 2 syntax error from function in include file Hi, good programmer but complete noob to ASP/VBscript here, with what must be a painfully obvious noob question... If I define a function (using sample code from here on devx.com): <% function WriteToFile(FileName, Contents, Append) ... end function %> inline in any of several .asp files, it works fine. But if I define the exact same function inside a separate .asp include file and include the file in those original .asp files, I get a syntax error: Microsoft VBScript compilation error '800a03ea' Syntax error /fsglobals.asp, line 7 function WriteToFile(FileName, Contents, Append) ^ Why? Searching the web I find plenty of sites talking about the benefits of defining ASP functions inside include files, but no amount of searching on this forum or on the web has turned up a useful example or a hint as to why this isn't working as expected. Thanks hugely for any help. Reply With Quote 03-20-2009,01:29 PM #2 larryy@indiana. View Profile View Forum Posts Registered User Join Date Mar 2009 Posts 2 Of course, as soon as I post, I figure it out. I found a question on another site about a similar problem, and though the ultimate cause was different, the main clue there was that the problem wasn't due to the include file or the function, but something before it or, more precisely, where exactly th