Wrox Programmer Forums
|
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 May 27th, 2005, 01:18 AM
SoC SoC is offline
Authorized User
 
Join Date: Jul 2004
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default Wildcards character/syntax

Hi,

I have a little script that is supposed to check for a certain value in a db column, and then do something if that particular calue is present:

Code:
...<%ElseIf rsIDK.Fields.Item("my_column").Value = "/default.asp" then ...
The problem is that my_column can contain up to 300 characters, so the code above doesn't work. What I really need is a wildcard at the end of "/default.asp" but I don't really know the correct way of doing this.

s

 
Old May 27th, 2005, 03:46 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hey s,

Try...
Code:
ElseIf Left(rsIDK.Fields.Item("my_column").Value, 12) = "/default.asp"
HTH,

Chris

 
Old May 27th, 2005, 11:16 PM
SoC SoC is offline
Authorized User
 
Join Date: Jul 2004
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, perfect. I see how it works.

Thanks for that.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax error converting datetime from character st vinod_yadav1919 SQL Server 2000 2 September 10th, 2010 10:11 AM
ObjectDataSource and Wildcards pipelineconsulting ASP.NET 2.0 Professional 1 October 19th, 2006 09:08 PM
Syntax error converting datetime from character st kkrish SQL Server 2000 11 September 6th, 2006 06:46 AM
XSLT Wildcards? kwilliams XSLT 2 September 28th, 2005 10:54 AM
Syntax error converting datetime from character st Uppa SQL Server 2000 2 February 8th, 2005 08:01 PM





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