RE: passing a field name to a confirmation page (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


BeTheBall -> RE: passing a field name to a confirmation page (8/25/2006 15:47:25)

What if you try it this way?

<%
fp_sQry="SELECT * FROM server WHERE ServName = '"& Request.Form("ServName")&"'"
fp_sDefault="ServName="
fp_sNoRecords="No records returned."
fp_sDataConn="projects"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=42
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
Response.write (fp_sQry)
Response.end

%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->

What is should do is write the actual query that is being passed to the db.






jgeatty -> RE: passing a field name to a confirmation page (8/25/2006 16:25:52)

i get:

cscrdtest026 has been submitted to the project database. What would you like to do now?

Add another server to the project >>
(This option copies the data from the server you just entered so you only have to change a few fields)

Done entering servers >>



Last Server Entered: cscrdtest026
SELECT * FROM server WHERE ServName = 'cscrdtest026'




BeTheBall -> RE: passing a field name to a confirmation page (8/25/2006 16:59:21)

OK and is cscrdtest026 the name of the server you just entered?




jgeatty -> RE: passing a field name to a confirmation page (8/25/2006 17:07:04)

yes




BeTheBall -> RE: passing a field name to a confirmation page (8/25/2006 17:55:11)

Something is not adding up. So what happens if you change:

<%
fp_sQry="SELECT * FROM server WHERE ServName = '"& Request.Form("ServName")&"'"
fp_sDefault="ServName="
fp_sNoRecords="No records returned."
fp_sDataConn="projects"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=42
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
Response.write (fp_sQry)
Response.end

%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->

back to:

<%
fp_sQry="SELECT * FROM server WHERE ServName = '"& Request.Form("ServName")&"'"
fp_sDefault="ServName="
fp_sNoRecords="No records returned."
fp_sDataConn="projects"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=42
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->




jgeatty -> RE: passing a field name to a confirmation page (8/25/2006 18:08:22)

i get:

cscrdtest028 has been submitted to the project database. What would you like to do now?

Add another server to the project >>
(This option copies the data from the server you just entered so you only have to change a few fields)

Done entering servers >>



Last Server Entered: cscrdtest028
No records returned.




BeTheBall -> RE: passing a field name to a confirmation page (8/25/2006 19:26:44)

And if you manually open the table named server, do you see one or more records where the field ServName = cscrdtest028?




jgeatty -> RE: passing a field name to a confirmation page (8/25/2006 19:36:38)

yes




jgeatty -> RE: passing a field name to a confirmation page (9/5/2006 18:51:03)

ok... i fugured out why it's not recalling the record. it's inserting 2 spaces before the server name in the database for some reason so when it recalls the name it can't find it. but i can't figure out why it's inserting those 2 spaces... Duane, I emailed you my files, do you see why it is doing that?




Page: <<   < prev  1 [2]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625