PC Review
Forums
Newsgroups
Microsoft Word
Microsoft Frontpage
Assign RECORD SOURCE to variable
Forums
Newsgroups
Microsoft Word
Microsoft Frontpage
Assign RECORD SOURCE to variable
![]() |
Assign RECORD SOURCE to variable |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I have one DATABASE with several RECORD SOURCES:
NEWS2006 NEWS2007 NEWS2008 This is the SQL statement from DRW: fp_sQry="SELECT county FROM NEWS2006" Is there a way to assign a variable to the record source, maybe even a Session varible so the user can select the record source and I can pass that variable over several pages. fp_sQry="SELECT county FROM Session ("recordsource")" <--- I know this doesn't work but it's the idea. Thanks, Erik Hardtle |
|
|
|
#2 |
|
Guest
Posts: n/a
|
You should be able to do this as long as you are handcoding.
-- ============================================== Thomas A. Rowe (Microsoft MVP - FrontPage) ============================================== If you feel your current issue is a results of installing a Service Pack or security update, please contact Microsoft Product Support Services: http://support.microsoft.com If the problem can be shown to have been caused by a security update, then there is usually no charge for the call. ============================================== "TV12 Webmaster" <webmaster@wcti12.com> wrote in message news:%23hMRZDkMGHA.2992@tk2msftngp13.phx.gbl... >I have one DATABASE with several RECORD SOURCES: > > NEWS2006 > NEWS2007 > NEWS2008 > > This is the SQL statement from DRW: > > fp_sQry="SELECT county FROM NEWS2006" > > > Is there a way to assign a variable to the record source, maybe even a Session varible so the user > can select the record source and I can pass that variable over several pages. > > fp_sQry="SELECT county FROM Session ("recordsource")" <--- I know this doesn't work but it's > the idea. > > Thanks, > Erik Hardtle > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
I'm using Frontpage, it keeps overwriting any changes I make to the fp_sQry
statement. Anyway around this. "Thomas A. Rowe" <tarowe@mvps.org> wrote in message news:OtQZYrkMGHA.2668@tk2msftngp13.phx.gbl... > You should be able to do this as long as you are handcoding. > > -- > ============================================== > Thomas A. Rowe (Microsoft MVP - FrontPage) > ============================================== > If you feel your current issue is a results of installing > a Service Pack or security update, please contact > Microsoft Product Support Services: > http://support.microsoft.com > If the problem can be shown to have been caused by a > security update, then there is usually no charge for the call. > ============================================== > > "TV12 Webmaster" <webmaster@wcti12.com> wrote in message > news:%23hMRZDkMGHA.2992@tk2msftngp13.phx.gbl... >>I have one DATABASE with several RECORD SOURCES: >> >> NEWS2006 >> NEWS2007 >> NEWS2008 >> >> This is the SQL statement from DRW: >> >> fp_sQry="SELECT county FROM NEWS2006" >> >> >> Is there a way to assign a variable to the record source, maybe even a >> Session varible so the user can select the record source and I can pass >> that variable over several pages. >> >> fp_sQry="SELECT county FROM Session ("recordsource")" <--- I know >> this doesn't work but it's the idea. >> >> Thanks, >> Erik Hardtle >> > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
In Code View, make your change to the SQL in the gray colored code, and save
your change while you're still in Code View. The change will be made to the maroon colored code when you save. -- ~ Kathleen Anderson Microsoft MVP - FrontPage Spider Web Woman Designs web: http://www.spiderwebwoman.com/resources/ FrontPage Support: http://www.frontpagemvps.com/ "TV12 Webmaster" <webmaster@wcti12.com> wrote in message news:e2X6SKmMGHA.1488@TK2MSFTNGP14.phx.gbl... > I'm using Frontpage, it keeps overwriting any changes I make to the > fp_sQry statement. Anyway around this. > > > "Thomas A. Rowe" <tarowe@mvps.org> wrote in message > news:OtQZYrkMGHA.2668@tk2msftngp13.phx.gbl... >> You should be able to do this as long as you are handcoding. >> >> -- >> ============================================== >> Thomas A. Rowe (Microsoft MVP - FrontPage) >> ============================================== >> If you feel your current issue is a results of installing >> a Service Pack or security update, please contact >> Microsoft Product Support Services: >> http://support.microsoft.com >> If the problem can be shown to have been caused by a >> security update, then there is usually no charge for the call. >> ============================================== >> >> "TV12 Webmaster" <webmaster@wcti12.com> wrote in message >> news:%23hMRZDkMGHA.2992@tk2msftngp13.phx.gbl... >>>I have one DATABASE with several RECORD SOURCES: >>> >>> NEWS2006 >>> NEWS2007 >>> NEWS2008 >>> >>> This is the SQL statement from DRW: >>> >>> fp_sQry="SELECT county FROM NEWS2006" >>> >>> >>> Is there a way to assign a variable to the record source, maybe even a >>> Session varible so the user can select the record source and I can pass >>> that variable over several pages. >>> >>> fp_sQry="SELECT county FROM Session ("recordsource")" <--- I know >>> this doesn't work but it's the idea. >>> >>> Thanks, >>> Erik Hardtle >>> >> >> > > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
But in order for the DBRW to recognize session variables the OP may need to make the tweak at
http://home.att.net/~codelibrary/Fr...20Modifications -- _____________________________________________ SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] "Warning - Using the F1 Key will not break anything!" (-; To find the best Newsgroup for FrontPage support see: http://www.frontpagemvps.com/FrontP...53/Default.aspx _____________________________________________ "Kathleen Anderson [MVP - FrontPage]" <spiderwebwoman@mvps.org> wrote in message news:erWiFVmMGHA.964@tk2msftngp13.phx.gbl... | In Code View, make your change to the SQL in the gray colored code, and save | your change while you're still in Code View. The change will be made to the | maroon colored code when you save. | | -- | | ~ Kathleen Anderson | Microsoft MVP - FrontPage | Spider Web Woman Designs | web: http://www.spiderwebwoman.com/resources/ | FrontPage Support: http://www.frontpagemvps.com/ | | | | | "TV12 Webmaster" <webmaster@wcti12.com> wrote in message | news:e2X6SKmMGHA.1488@TK2MSFTNGP14.phx.gbl... | > I'm using Frontpage, it keeps overwriting any changes I make to the | > fp_sQry statement. Anyway around this. | > | > | > "Thomas A. Rowe" <tarowe@mvps.org> wrote in message | > news:OtQZYrkMGHA.2668@tk2msftngp13.phx.gbl... | >> You should be able to do this as long as you are handcoding. | >> | >> -- | >> ============================================== | >> Thomas A. Rowe (Microsoft MVP - FrontPage) | >> ============================================== | >> If you feel your current issue is a results of installing | >> a Service Pack or security update, please contact | >> Microsoft Product Support Services: | >> http://support.microsoft.com | >> If the problem can be shown to have been caused by a | >> security update, then there is usually no charge for the call. | >> ============================================== | >> | >> "TV12 Webmaster" <webmaster@wcti12.com> wrote in message | >> news:%23hMRZDkMGHA.2992@tk2msftngp13.phx.gbl... | >>>I have one DATABASE with several RECORD SOURCES: | >>> | >>> NEWS2006 | >>> NEWS2007 | >>> NEWS2008 | >>> | >>> This is the SQL statement from DRW: | >>> | >>> fp_sQry="SELECT county FROM NEWS2006" | >>> | >>> | >>> Is there a way to assign a variable to the record source, maybe even a | >>> Session varible so the user can select the record source and I can pass | >>> that variable over several pages. | >>> | >>> fp_sQry="SELECT county FROM Session ("recordsource")" <--- I know | >>> this doesn't work but it's the idea. | >>> | >>> Thanks, | >>> Erik Hardtle | >>> | >> | >> | > | > | | |
|
|
|
#6 |
|
Guest
Posts: n/a
|
I tried putting it in the grey code... it wouldn't format the red code
properly. So I used the spooky diet (www.outfront.net) and removed the proper grey text which then allowed me to put in the proper sql statment. Above my html DRW page I added this: <% Session("recordsource")= request ("recordsource") %> This requests the variable from the form and applies it to a session variable. Here is my SQL query statement. SELECT * FROM "& Session("recordsource") &" WHERE (COUNTY = '::COUNTY::' OR HEADLINE LIKE '%::keyword::%' OR TEASE LIKE '%::keyword::%' OR STORY LIKE '%::keyword::%') ORDER BY SDATE DESC Thanks for the help. "Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message news:OId$dxtMGHA.2828@TK2MSFTNGP12.phx.gbl... > But in order for the DBRW to recognize session variables the OP may need > to make the tweak at > http://home.att.net/~codelibrary/Fr...20Modifications > > -- > > _____________________________________________ > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] > "Warning - Using the F1 Key will not break anything!" (-; > To find the best Newsgroup for FrontPage support see: > http://www.frontpagemvps.com/FrontP...53/Default.aspx > _____________________________________________ > > > "Kathleen Anderson [MVP - FrontPage]" <spiderwebwoman@mvps.org> wrote in > message news:erWiFVmMGHA.964@tk2msftngp13.phx.gbl... > | In Code View, make your change to the SQL in the gray colored code, and > save > | your change while you're still in Code View. The change will be made to > the > | maroon colored code when you save. > | > | -- > | > | ~ Kathleen Anderson > | Microsoft MVP - FrontPage > | Spider Web Woman Designs > | web: http://www.spiderwebwoman.com/resources/ > | FrontPage Support: http://www.frontpagemvps.com/ > | > | > | > | > | "TV12 Webmaster" <webmaster@wcti12.com> wrote in message > | news:e2X6SKmMGHA.1488@TK2MSFTNGP14.phx.gbl... > | > I'm using Frontpage, it keeps overwriting any changes I make to the > | > fp_sQry statement. Anyway around this. > | > > | > > | > "Thomas A. Rowe" <tarowe@mvps.org> wrote in message > | > news:OtQZYrkMGHA.2668@tk2msftngp13.phx.gbl... > | >> You should be able to do this as long as you are handcoding. > | >> > | >> -- > | >> ============================================== > | >> Thomas A. Rowe (Microsoft MVP - FrontPage) > | >> ============================================== > | >> If you feel your current issue is a results of installing > | >> a Service Pack or security update, please contact > | >> Microsoft Product Support Services: > | >> http://support.microsoft.com > | >> If the problem can be shown to have been caused by a > | >> security update, then there is usually no charge for the call. > | >> ============================================== > | >> > | >> "TV12 Webmaster" <webmaster@wcti12.com> wrote in message > | >> news:%23hMRZDkMGHA.2992@tk2msftngp13.phx.gbl... > | >>>I have one DATABASE with several RECORD SOURCES: > | >>> > | >>> NEWS2006 > | >>> NEWS2007 > | >>> NEWS2008 > | >>> > | >>> This is the SQL statement from DRW: > | >>> > | >>> fp_sQry="SELECT county FROM NEWS2006" > | >>> > | >>> > | >>> Is there a way to assign a variable to the record source, maybe even > a > | >>> Session varible so the user can select the record source and I can > pass > | >>> that variable over several pages. > | >>> > | >>> fp_sQry="SELECT county FROM Session ("recordsource")" <--- I > know > | >>> this doesn't work but it's the idea. > | >>> > | >>> Thanks, > | >>> Erik Hardtle > | >>> > | >> > | >> > | > > | > > | > | > > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
The better way to do it is
<% Session("recordsource") = Request.Form("recordsource") %> -- _____________________________________________ SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] "Warning - Using the F1 Key will not break anything!" (-; To find the best Newsgroup for FrontPage support see: http://www.frontpagemvps.com/FrontP...53/Default.aspx _____________________________________________ "TV12 Webmaster" <webmaster@wcti12.com> wrote in message news:%23Xygl7vMGHA.532@TK2MSFTNGP15.phx.gbl... |I tried putting it in the grey code... it wouldn't format the red code | properly. So I used the spooky diet (www.outfront.net) and removed the | proper grey text which then allowed me to put in the proper sql statment. | | Above my html DRW page I added this: | <% | Session("recordsource")= request ("recordsource") | %> | | This requests the variable from the form and applies it to a session | variable. | | Here is my SQL query statement. | | SELECT * FROM "& Session("recordsource") &" WHERE (COUNTY = '::COUNTY::' OR | HEADLINE LIKE '%::keyword::%' OR TEASE LIKE '%::keyword::%' OR STORY LIKE | '%::keyword::%') ORDER BY SDATE DESC | | Thanks for the help. | | "Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message | news:OId$dxtMGHA.2828@TK2MSFTNGP12.phx.gbl... | > But in order for the DBRW to recognize session variables the OP may need | > to make the tweak at | > http://home.att.net/~codelibrary/Fr...20Modifications | > | > -- | > | > _____________________________________________ | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] | > "Warning - Using the F1 Key will not break anything!" (-; | > To find the best Newsgroup for FrontPage support see: | > http://www.frontpagemvps.com/FrontP...53/Default.aspx | > _____________________________________________ | > | > | > "Kathleen Anderson [MVP - FrontPage]" <spiderwebwoman@mvps.org> wrote in | > message news:erWiFVmMGHA.964@tk2msftngp13.phx.gbl... | > | In Code View, make your change to the SQL in the gray colored code, and | > save | > | your change while you're still in Code View. The change will be made to | > the | > | maroon colored code when you save. | > | | > | -- | > | | > | ~ Kathleen Anderson | > | Microsoft MVP - FrontPage | > | Spider Web Woman Designs | > | web: http://www.spiderwebwoman.com/resources/ | > | FrontPage Support: http://www.frontpagemvps.com/ | > | | > | | > | | > | | > | "TV12 Webmaster" <webmaster@wcti12.com> wrote in message | > | news:e2X6SKmMGHA.1488@TK2MSFTNGP14.phx.gbl... | > | > I'm using Frontpage, it keeps overwriting any changes I make to the | > | > fp_sQry statement. Anyway around this. | > | > | > | > | > | > "Thomas A. Rowe" <tarowe@mvps.org> wrote in message | > | > news:OtQZYrkMGHA.2668@tk2msftngp13.phx.gbl... | > | >> You should be able to do this as long as you are handcoding. | > | >> | > | >> -- | > | >> ============================================== | > | >> Thomas A. Rowe (Microsoft MVP - FrontPage) | > | >> ============================================== | > | >> If you feel your current issue is a results of installing | > | >> a Service Pack or security update, please contact | > | >> Microsoft Product Support Services: | > | >> http://support.microsoft.com | > | >> If the problem can be shown to have been caused by a | > | >> security update, then there is usually no charge for the call. | > | >> ============================================== | > | >> | > | >> "TV12 Webmaster" <webmaster@wcti12.com> wrote in message | > | >> news:%23hMRZDkMGHA.2992@tk2msftngp13.phx.gbl... | > | >>>I have one DATABASE with several RECORD SOURCES: | > | >>> | > | >>> NEWS2006 | > | >>> NEWS2007 | > | >>> NEWS2008 | > | >>> | > | >>> This is the SQL statement from DRW: | > | >>> | > | >>> fp_sQry="SELECT county FROM NEWS2006" | > | >>> | > | >>> | > | >>> Is there a way to assign a variable to the record source, maybe even | > a | > | >>> Session varible so the user can select the record source and I can | > pass | > | >>> that variable over several pages. | > | >>> | > | >>> fp_sQry="SELECT county FROM Session ("recordsource")" <--- I | > know | > | >>> this doesn't work but it's the idea. | > | >>> | > | >>> Thanks, | > | >>> Erik Hardtle | > | >>> | > | >> | > | >> | > | > | > | > | > | | > | | > | > | | |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

