CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 If check on part of value

Print topic Send  topic

Author Message
J.D.
Posted: 07/08/2002, 1:38 PM

Hello All,

I am trying to read in a value from the database. Doing an if check on the value to see if it has rtr_ or swt_ in the name of the node. I am using asp and need assistance on the code to do this, Do I use an array? Since I only need to check if part of the value.

Thanks,

J.D.
Chris K.
Posted: 07/09/2002, 1:10 AM

I'm not sure if I understood you right...

You can use Dlookup/CCDlookup function to retrieve database value and then check if it contains some substring using InStr function.

CC:
value = DLookup("tablename", "fieldname", "where condition")
if InStr(value, "rtr_") > 0 then
' if rtr_ found within value
end if

CCS:
value = CCDLookup("fieldname", "tablename", "where condition")
if InStr(value, "rtr_") > 0 then
' if rtr_ found within value
end if

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.