FP won't let me insert code in code view

G

Guest

I have been accessing a database successfully for quite a while. Now I want
to be able to edit and delete records in the same database. I had FP create a
new Results Query Page in a new sub-directory. Also had FP create several
edit files like editor, list, delete etc. I changed the Results Query Page to
send the record data to the "list page" so I would have access to the data
for editing. The "list" program gets the data but it displays all records
rather than just those I matched up with in the Results Page. So, I tried to
add code to the edit page to select and list only records that match a search
criteria. This line of code is exactly the same as that which appears in the
Results Page. The line of code is as follows:

fp_sQry="SELECT * FROM Results WHERE (countryin = '::countryin::' AND
stateprovincein = '::stateprovincein::' AND cityin = '::cityin::') ORDER BY
Timestamp ASC"

When I try to save the page, I get the following error message:

"The contents of a front page component have been modified. These contents
will be over written when you save this page."

After the save, the new code disappears and the file return to it's original
status. What am I doing wrong?
 
K

Kathleen Anderson [MVP - FrontPage]

Find the SQL in the gray-colored code and change it. Save the changes while
still in Code/HTML view. You will notice that once you've saved your changes
they are also made to the maroon colored code - that is by design. The
maroon colored code should never be touched; it's generated by the gray code
at save time.


--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others
 
G

Guest

I don't know what you mean when you say "Find the SQL code in the
gray-colored code and change it. How do I identify sql code in the "list.asp"
file? I see no grey code that resembles what I want to insert. The line of
code I showed you in the original post which was a WHERE STATEMENT was a line
of code I copied from the Results.asp file and pasted into the list.asp file.
 
G

Guest

Hi Kathleen. I found the gray SQL code and I inserted the following:
s-criteria="[countryin] EQ {countryin} + [stateprovincein] EQ
{stateprovincein} + [cityin] EQ {cityin} +" s-order="[Timestamp] +"
s-sql="SELECT * FROM Results WHERE (countryin = '::countryin::' AND
stateprovincein = '::stateprovincein::' AND cityin = '::cityin::') ORDER BY
Timestamp ASC" s-norecordsfound="No records returned. Check spelling and try
again."

The maroon code was automatically generated as you had said.

When I execute the search I get the "No records returned message". I know
they are there because I can find them with another search page. What I don't
know is what is in the "FORM FIELDS" that are being used to compare against
the actual records returned. I assume that the values types into the Query
Page are transported to the List Page. Am I correct or must I somehow
transfer the values? If yes, then how?
 
K

Kathleen Anderson [MVP - FrontPage]

CLS said:
Hi Kathleen. I found the gray SQL code and I inserted the following:
s-criteria="[countryin] EQ {countryin} + [stateprovincein] EQ
{stateprovincein} + [cityin] EQ {cityin} +" s-order="[Timestamp] +"
s-sql="SELECT * FROM Results WHERE (countryin = '::countryin::' AND
stateprovincein = '::stateprovincein::' AND cityin = '::cityin::') ORDER
BY
Timestamp ASC" s-norecordsfound="No records returned. Check spelling and
try
again."

The maroon code was automatically generated as you had said.

When I execute the search I get the "No records returned message". I know
they are there because I can find them with another search page. What I
don't
know is what is in the "FORM FIELDS" that are being used to compare
against
the actual records returned. I assume that the values types into the Query
Page are transported to the List Page. Am I correct or must I somehow
transfer the values? If yes, then how?

Yes, you are correct. The Query Page should have the countryin,
stateprovincein and cityin form fields and pass (post) the values entered to
your list page.


--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others
 
G

Guest

Kathleen. I can't thank you enough. It works great now that I used the
correct form field names. I was using the wrong names.

You get A+++ from me.

Kathleen Anderson said:
CLS said:
Hi Kathleen. I found the gray SQL code and I inserted the following:
s-criteria="[countryin] EQ {countryin} + [stateprovincein] EQ
{stateprovincein} + [cityin] EQ {cityin} +" s-order="[Timestamp] +"
s-sql="SELECT * FROM Results WHERE (countryin = '::countryin::' AND
stateprovincein = '::stateprovincein::' AND cityin = '::cityin::') ORDER
BY
Timestamp ASC" s-norecordsfound="No records returned. Check spelling and
try
again."

The maroon code was automatically generated as you had said.

When I execute the search I get the "No records returned message". I know
they are there because I can find them with another search page. What I
don't
know is what is in the "FORM FIELDS" that are being used to compare
against
the actual records returned. I assume that the values types into the Query
Page are transported to the List Page. Am I correct or must I somehow
transfer the values? If yes, then how?

Yes, you are correct. The Query Page should have the countryin,
stateprovincein and cityin form fields and pass (post) the values entered to
your list page.


--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others
 
K

Kathleen Anderson [MVP - FrontPage]

Thanks for the feedback! It's a great way to end the week, isn't it?

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others


CLS said:
Kathleen. I can't thank you enough. It works great now that I used the
correct form field names. I was using the wrong names.

You get A+++ from me.

Kathleen Anderson said:
CLS said:
Hi Kathleen. I found the gray SQL code and I inserted the following:
s-criteria="[countryin] EQ {countryin} + [stateprovincein] EQ
{stateprovincein} + [cityin] EQ {cityin} +" s-order="[Timestamp] +"
s-sql="SELECT * FROM Results WHERE (countryin = '::countryin::' AND
stateprovincein = '::stateprovincein::' AND cityin = '::cityin::')
ORDER
BY
Timestamp ASC" s-norecordsfound="No records returned. Check spelling
and
try
again."

The maroon code was automatically generated as you had said.

When I execute the search I get the "No records returned message". I
know
they are there because I can find them with another search page. What I
don't
know is what is in the "FORM FIELDS" that are being used to compare
against
the actual records returned. I assume that the values types into the
Query
Page are transported to the List Page. Am I correct or must I somehow
transfer the values? If yes, then how?

Yes, you are correct. The Query Page should have the countryin,
stateprovincein and cityin form fields and pass (post) the values entered
to
your list page.


--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others
 
R

Ronx

You may wish to place Timestamp in square brackets since Timestamp is a
reserved word.
ORDER BY [Timestamp] ASC
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp

FrontPage Support: http://www.frontpagemvps.com/




Hi Kathleen. I found the gray SQL code and I inserted the following:
s-criteria="[countryin] EQ {countryin} + [stateprovincein] EQ
{stateprovincein} + [cityin] EQ {cityin} +" s-order="[Timestamp] +"
s-sql="SELECT * FROM Results WHERE (countryin = '::countryin::' AND
stateprovincein = '::stateprovincein::' AND cityin = '::cityin::') ORDER BY
Timestamp ASC" s-norecordsfound="No records returned. Check spelling and try
again."

The maroon code was automatically generated as you had said.

When I execute the search I get the "No records returned message". I know
they are there because I can find them with another search page. What I don't
know is what is in the "FORM FIELDS" that are being used to compare against
the actual records returned. I assume that the values types into the Query
Page are transported to the List Page. Am I correct or must I somehow
transfer the values? If yes, then how?

CLS said:
I don't know what you mean when you say "Find the SQL code in the
gray-colored code and change it. How do I identify sql code in the "list.asp"
file? I see no grey code that resembles what I want to insert. The line of
code I showed you in the original post which was a WHERE STATEMENT was a line
of code I copied from the Results.asp file and pasted into the list.asp file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top