CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 retrieving value of where into html text box ASP

Print topic Send  topic

Author Message
jlo
Posted: 01/20/2004, 9:41 AM

Hi hope someone can help

after my results grid displays it's results I want to populate a standard html textbox with the SQL that was built and run.

I tried to add a function to the event (added in Page_events.asp: Function Search_Results_DataSource_AfterExecuteSelect()

I just want to populate the textbox and have tried a thousand things like reading into a variable
set s_SQLwhereClause=object.AssembledWhere
OR
set s_SQLwhereClause=clsSearch_ResultsDataSource.GetWhere()

I also have trouble referencing the text box on my form ie. cant even do
set vTxtResultsFld.value="test"

please help as I am loosing my mind, the help doesnt really give an example of tying this stuff together

thanks in advance JLo :-)
DonB
Posted: 01/20/2004, 11:36 AM

The best place to load the value for a control is in it's Before Show event:
Eventcaller.Value = "somevalue".
For a grid, the best place is the Before Show Row event:
Eventcaller.myTextbox.Value = "somevalue"

Note that you had "set" in your example - that is invalid except for
creating/assigning object variables (i.e., don't use that keyword to assign
values to an object unless the thing being assigned is also an object).


--
DonB

http://www.gotodon.com/ccbth


"jlo" <jlo@forum.codecharge> wrote in message
news:6400d6860129e5@news.codecharge.com...
> Hi hope someone can help
>
> after my results grid displays it's results I want to populate a standard
html textbox with the SQL that was built and run.
>
> I tried to add a function to the event (added in Page_events.asp: Function
Search_Results_DataSource_AfterExecuteSelect()
>
> I just want to populate the textbox and have tried a thousand things like
reading into a variable
> set s_SQLwhereClause=object.AssembledWhere
> OR
> set s_SQLwhereClause=clsSearch_ResultsDataSource.GetWhere()
>
> I also have trouble referencing the text box on my form ie. cant even do
> set vTxtResultsFld.value="test"
>
> please help as I am loosing my mind, the help doesnt really give an
example of tying this stuff together
>
> thanks in advance JLo :-)
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Nicole

Posts: 586
Posted: 01/26/2004, 2:58 AM

Hello,
Don B. explained how to populate the control with value.
I suggest that you create the textbox (Label, other control) Before Show event to print the source query. Here is sample code
form_name.field_name.Value = form_name.datasource.SQL & “ WHERE ” & form_name.datasource.Where & “b ORDER BY ” & form_name.datasource.Order

Note that code may vary if lets say Order By clause is empty

_________________
Regards,
Nicole
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.

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.