Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 23rd, 2004, 11:49 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default Expected 'Then'

Hi there

I'm getting an error message when I am using an 'if....then' statement. This is the error:

Microsoft VBScript compilation error '800a03f9'

Expected 'Then'

/service.asp, line 67

if isNull rsServices("Imagesml") or rsServices("Imagesml") = empty then

I don't know why it's asking me for a 'then' when I already have one.

Any help much appreciated.

Adam

 
Old July 23rd, 2004, 01:21 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: , , .
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

isNull needs to have a parameter. you probably want:

if isNull(rsServices("Imagesml")) or IsNull(rsServices("Imagesml"))then

Yehuda
 
Old July 24th, 2004, 01:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

Hi there

But if I make both of them isNull, then it defeats the OR option where I ask if the field is empty?

thanks

Adam

 
Old July 24th, 2004, 02:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

if isNull rsServices("Imagesml") or rsServices("Imagesml") = empty then

Is that marked in RED a variable? If so what does it hold in it? If not What do you want to check there with?

CheerS!

_________________________
- Vijay G
Strive for Perfection
 
Old July 26th, 2004, 07:07 AM
Friend of Wrox
 
Join Date: Aug 2003
Location: , , .
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am not sure what empty is supposed to be. Is Empty a variable? Is it ""? Is it IsEmpty (as in the variable has not been initialized)? Whatever it is empty appears not to be valid. What are you trying to do?

Yehuda
 
Old July 26th, 2004, 02:36 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

if isNull rsServices("Imagesml") or isEmpty(rsServices("Imagesml")) then

This should work.
Cheers!

_________________________
- Vijay G
Strive for Perfection




Similar Threads
Thread Thread Starter Forum Replies Last Post
expected Then Adam H-W Classic ASP Basics 6 April 17th, 2008 05:41 AM
expected ';' RoniR Javascript 3 February 1st, 2007 05:28 AM
Object Expected!! Apocolypse2005 Javascript 0 July 3rd, 2006 12:23 PM
too few parameters expected n desprate Access VBA 6 April 29th, 2005 06:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.