CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 db connection for CCDLookUp function

Print topic Send  topic

Author Message
GeorgeS

Posts: 206
Posted: 06/25/2004, 5:39 PM

Hi,
If I just want to use one control on my page - a label which will display data through SSDlookup function how & where do I open DB Connection?
(No grids, forms or anything else on the page)
Thanks
_________________
GeorgeS
View profile  Send private message
DonB
Posted: 06/25/2004, 6:43 PM

the Connection only exists in the presence of a data-bound object (grid,
record, etc.). Without one of those, there is no connection. Why not use a
record form (minus the add/update/delete buttons) to load the label wtih the
data value?

A CCS control does not need to include an html table structure, although CCS
generates it. You can remove everything that is part of the visual html
structure (all the table, td, tr tags) just leaving the "{Label1}" as the
placeholder for your data. The surrounding template block and <FORM> tags
must be left alone as these are required for establishing the connection and
retrieving your data from the database.

--
DonB

logging at http://www.gotodon.com/ccbth, and blogging at
http://ccbth.gotodon.net
Tuong Do
Posted: 06/27/2004, 4:28 PM

Hi George,

If your connection is Connection1

<Code>
Dim myconnection
SET myconnection = New clsDBConnection1
myconnection.open
Label1.value = CCDLookup("field", "table", "condition", myconnection )

</Code>
GeorgeS

Posts: 206
Posted: 06/27/2004, 6:22 PM

Hi Tuong,
Do I need to write it in Page BeforeShow event or in any other place in order to use the same connection for all labels?

>>If your connection is Connection1<<
Is this the name of the connection that I have created for the whole project?

Thank you.
_________________
GeorgeS
View profile  Send private message
Tuong Do
Posted: 06/27/2004, 6:29 PM

Hi George
> >>If your connection is Connection1<<
> Is this the name of the connection that I have created for the whole
project?
Yes It is

> Do I need to write it in Page BeforeShow event or in any other place in
order
> to use the same connection for all labels?

You can write it in Page before show event and have all your label use the
same connection in the page before show event.

If you want to have it used anywhere in the page, I suggest create it at the
beginning of the page (after the include file directive)

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.