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 |
|
|
|