CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Problem with CCDLookUp

Print topic Send  topic

Author Message
Denis
Posted: 06/10/2004, 2:40 AM

Hi,

the problem is.... I have to select one field in a table based on two variables.

I tried for istance:
label1.value = CStr(CCDLookUp("approved","table","UserID=1 AND CountryID=3", DBSqlServer)) and it works,

but the problem is how to change UserId and CountryID to be variables, I can write:

dim UserId
userid = session("UserID")
label1.value = CStr(CCDLookUp("approved","table","UserID="& userid, DBSqlServer))

but I don't know how to add second variable (CountryID) in sql query and make it work...
peterr


Posts: 5971
Posted: 06/10/2004, 3:25 AM

Denis,

label1.value = CStr(CCDLookUp("approved","table","UserID="& Session("UserID") & " AND CountryID=" & XYZ, DBSqlServer))

XYZ should be replaced with Session("CountryID"), or FormName.FieldName.CountryID, etc. depending where you're retrieving the country from.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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