Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 5th, 2010, 09:20 AM
Authorized User
Points: 287, Level: 5
Points: 287, Level: 5 Points: 287, Level: 5 Points: 287, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2006
Location: Colorado Springs, CO
Posts: 60
Thanks: 1
Thanked 0 Times in 0 Posts
Default IF Statement

Okay, I'm doing something really stupid, and can't figure it out. I'm trying to write a simple IF statement in the following context:

  <td><font face="Verdana" size=1>
   if rsqdb("KPName") like '%cpu%' then
      response.write rsqdb("CPU")
      response.write rsqdb("KPName")
      end if
I keep getting a syntax error.

Last edited by dalezjc; November 5th, 2010 at 09:24 AM..
Reply With Quote
  #2 (permalink)  
Old November 5th, 2010, 02:35 PM
Friend of Wrox
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

LIKE is a function ONLY available in SQL coding.

If InStr( 1, rsqdb("KPName", "cpu", vbTextCompare )  > 0 Then
But even better might be to do this in the SQL query. Would have to see the query to know.
Reply With Quote

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
IF ELSE Statement webXtreme Classic ASP Basics 19 February 9th, 2007 05:56 PM
Like Statement Nitin_sharma Oracle ASP 2 May 10th, 2005 12:18 AM
Like Statement Nitin_sharma Oracle 4 February 12th, 2005 01:46 PM
With Statement aliddle General .NET 1 February 9th, 2005 09:22 AM
if statement markhardiman VS.NET 2002/2003 1 July 31st, 2003 06:56 PM

All times are GMT -4. The time now is 07:02 PM.

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