Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Results- Custom Query

Status
Not open for further replies.

ChuckG

MIS
Feb 28, 2001
211
US
Was just wondering, I'm doing some database retreivals using the DRW, in quite a few of these I'm using the value of a variable I passed from the previous page (using here.asp?variable=value)

But Frontpage won't verify the custom query with that varibable name.

What I've been doing is (long and a pain in butt) is make the query, then go back after the file is saved and edit it with a text editor and modify the fp_sQry to do what I want. But if I re-open the page in FP, it re-writes the fp_sQry.

Here's an example.

Here's what FP makes
fp_sQry="SELECT * FROM int_dis WHERE region = ::reg::"

And here's what I change it to
fp_sQry="SELECT * FROM int_dis WHERE region = '"& reg & "'"

My line works, and views fine. But everytime I modify one of these FP files with FP, I have to go back and manually update that line.

Any way to be able to use a variable name in the custom query screen it'self?

Oh just in case anyone wants to know how I'm getting the value of REG.

reg = CStr (Request("reg"))

Thanks for any enlightenment.

ChuckG
 
I am also having this same problem.
After using the DRW, I go into the code
and edit the code to format a cell in the table.

FrontPage writes:
<%=FP_FieldVal(fp_rs,"Weight")%>

I change it to:
<%=FormatNumber(FP_FieldVal(fp_rs,"Weight"),0)%>

but when you go to save it
changes it back.

Anyway to make it stop overwriting it?

Thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top