navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Cannot use parentheses when calling a Sub

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Cannot use parentheses when calling a Sub
Page: [1]
 
seth

 

Posts: 312
From: canada
Status: offline

 
Cannot use parentheses when calling a Sub - 4/4/2006 12:22:02   
This error is driving me CraZy, any ideas

Microsoft VBScript compilation error '800a0414'

Cannot use parentheses when calling a Sub

/admin_test/viewLists.asp, line 263

Response.Write(Replace(objRS("FirstName")),"'","''") & " " & (Replace(objRS("LastName")),"'","''"))




< Message edited by seth -- 4/4/2006 12:35:11 >
Spooky

 

Posts: 26599
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Cannot use parentheses when calling a Sub - 4/4/2006 12:34:00   
Your brackets are a bit out of place :

  Response.Write (Replace(objRS("FirstName"), ",", "") & " " & Replace(objRS("LastName"), ",", ""))


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to seth)
seth

 

Posts: 312
From: canada
Status: offline

 
RE: Cannot use parentheses when calling a Sub - 4/4/2006 12:53:28   
hey wait a second, i want to be dealing with apostrophies not commas in the name fields,


blah2 = (Replace(objRS("LastName")), "'", "''")


but i getting error:
Expected ')'

blah2 = (Replace(objRS("LastName")), "'", "''")


(in reply to Spooky)
Spooky

 

Posts: 26599
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Cannot use parentheses when calling a Sub - 4/4/2006 13:02:16   
Same answer - get your brackets in the right place!

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to seth)
rdouglass

 

Posts: 9228
From: Biddeford, ME USA
Status: offline

 
RE: Cannot use parentheses when calling a Sub - 4/4/2006 14:04:50   
quote:

blah2 = (Replace(objRS("LastName")), "'", "''")


Look closely at this one:

blah2 = Replace(objRS("LastName"), "'", "''")

The replace function syntax is like this:

Replace (stringToSearch,stringToSearchFor,replacementString)

stringToSearch = objRS("LastName")
stringToSearchFor = "'"
replacementString = "''"

That any clearer?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Cannot use parentheses when calling a Sub
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts