Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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

Reply With Quote
  #2 (permalink)  
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
Reply With Quote
  #3 (permalink)  
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

Reply With Quote
  #4 (permalink)  
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
Reply With Quote
  #5 (permalink)  
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
Reply With Quote
  #6 (permalink)  
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:03 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.