CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Problem with CCDLookUp

Print topic Send  topic

Author Message
Fonnie Reagan
Posted: 08/19/2002, 10:21 AM

I am trying to learn CodeCharge, so I have started with the simplest project on my list.
3 forms, no updates allowed, app only displays info.
First screen lists/searches employees. Select an employee and the second form is displayed. This works fine.
Second form lists all records from a second table where the employee number matches. Select a record, and the third form is displayed. This works fine.
Third forms lists all recors in a third table where the employee number and benefit number match. This works fine.
I am trying to show the employee name at the top of the grid in pages 2 and 3. I have tried adding a label and assigning the value straight from a database field and in code. Neither way gives any value at all.
What am I doing wrong?
George L.
Posted: 08/19/2002, 11:06 AM

You have to define a Database Connection Class in order to use CCDLookup.

Example for PHP would be:

$db = new clsDB<DBNAME>

$string = CCDLookup("column","table","where something='something'",$db);

$db is the connection class you opened above. This has to be done for every custom SQL you use. Of course you can reuse the existing DB Connection Class if you are doing a series of SQL stateements within a function.

$string would return the database value from the query.

Please read C.C.S Help Page under Programming Reference/Classes for more info.
Fonnie Reagan
Posted: 08/19/2002, 1:14 PM

Still trying to find what I'm doing wrong, so I am simplifying.
Using CCS, ASP3.0 with Templates
Added a line of custom code to the Page_Before Show event.
line reads BenefitInfo.lblEmpName.Value="This Worked"

BenefitInfo is the Grid Name
lblEmpName is the Label name, it is shown as a child of the grid.

Publish the page and the control is blank.
If I misspell something, I get an error so I know that this event code is being processed.
Fonnie Reagan
Posted: 08/19/2002, 1:37 PM

Everything seems to be working now.
I cleared out everything from the area where the label was, and inserted only a FORM LABEL. Not sure what I did before, but now the code works.

George L., Thanks for the comment. You did correct my syntax for the CCDLookUp function. Based on your comment, I figured out what the connection CodeCharge made was called so I could use it.
Fonnie Reagan
Posted: 08/19/2002, 2:14 PM

Spoke too soon.
Modified third page with process from second page that worked. Won't work now.
I can load static text into my label at the top of the page.
I have a hidden field in the record that has the value I am trying to set at the top. The box has the correct value, but I can't copy it up.

   


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.