Do FP2003 forms work without FP extensions? (Full Version)

All Forums >> [Web Development] >> Server Issues



Message


Anne Lindberg -> Do FP2003 forms work without FP extensions? (7/19/2005 15:34:32)

I'm having an issue with my FP2002 pages on our Windows 2003 (IIS6.0) with no FP extensions. None of my forms work (using Access db). Do I have to re-do all my pages in FP2003 for them to work or is there a quick fix? I appreciate any response.
Thank you,
Anne




dpf -> RE: Do FP2003 forms work without FP extensions? (7/19/2005 16:02:47)

fp forms require the extensions to be installed on the server in order to function




rdouglass -> RE: Do FP2003 forms work without FP extensions? (7/19/2005 16:09:43)

quote:

None of my forms work (using Access db).


If you're using the DRW, then yes, you must have extensions installed.

If you're using straight ASP, they're not required but check to see that ASP is enabled. It is not by default on Win2K3 Server/IIS 6.




Anne Lindberg -> RE: Do FP2003 forms work without FP extensions? (7/20/2005 9:04:56)

My dear friend Rdouglas,
You're always there when I need you. Does this mean that if I take out all the webbot code (using Spooky's diet), my FP2002 forms will work on this server?
Thanks,
Anne




rdouglass -> RE: Do FP2003 forms work without FP extensions? (7/20/2005 9:10:31)

quote:

Does this mean that if I take out all the webbot code (using Spooky's diet), my FP2002 forms will work on this server?


Unfortunately, no. [:(]

If you're using any includes like:

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

then you are using FrontPage extensions.

Do you have a lot of them? This may be a good opportunity to ease a little away from the DRW. Once you've done 2 or 3 database connections without the DRW, they become easier (just like anything else).

And IMO, since the DRW tables are usually somewhat limited, they are the easiest ones to convert and learn with. [;)]

Without that, I'd recommend getting on a box with extensions.




Anne Lindberg -> RE: Do FP2003 forms work without FP extensions? (7/20/2005 10:00:09)

I have 6 apps on that server and yes I do use those include files so I will follow your advice unless you believe this article I found might remedy my situation. What do you think? This is totally out of my realm.

"While WSS and SPS 2003 do support many of the functions found in FrontPage Server Extensions, there are several important limitations. For instance, they do not support ASP pages, linking to an Access database to display dynamic database content on a web page or even hit counters. You can not run both FPSE and WSS on a single a site / virtual server but (contrary to some documentation) you can run both FPSE and WSS on the same IIS 6 server".





rdouglass -> RE: Do FP2003 forms work without FP extensions? (7/20/2005 10:31:04)

Well, I'm not really sure how that quote relates to this implementation but if you're running IIS and have ASP enabled, you should be able to make Access databases work.

Would you like to post one of your simpler DRW's and I'll try to show you an ASP equivalent?




Anne Lindberg -> RE: Do FP2003 forms work without FP extensions? (7/20/2005 11:24:17)

You're the best. Here's one of my very simple result pages using DRW. Thanks so much.

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Results</title>
<link rel="stylesheet" type="text/css" href="http://ctdcf-web/css/dcfstyles.css">
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
</head>

<body>

<table>
<tbody>
</tbody>
</table>
<table>
<tbody>
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="INSERT INTO Directory (firstname, lastname, telephone, email) VALUES ('::firstname::', '::lastname::', '::telephone::', '::email::') "
fp_sDefault="firstname=&lastname=&telephone=&email="
fp_sNoRecords="<tr><td colspan=16 align=""LEFT"" width=""100%""></td></tr>"
fp_sDataConn="phone"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>



<p align="center"> </p>



<p align="center"><span lang="en-us"><b>YOUR ENTRY HAS BEEN
SAVED.</b></span></p>



<p align="center"> </p>



<p align="center"><a href="phone_frm.asp">Directory Entry Form</a></p>



<p align="center"><a href="list.asp">Change or View All Directory</a></p>



<p align="center"><a href="phone_search.asp">Search Phone Directory</a></p>



<p align="center"> </p>
<p align="center"> </p>



<p align="center"> </p>



</body>

</html>




rdouglass -> RE: Do FP2003 forms work without FP extensions? (7/20/2005 14:06:13)

Here is sample code for 2 pages. The first one should do the same thing as the code you posted above without using FrontPage extensions. The second page shows you how I'd list those same 4 items from that table for all records. If your DB's are in the fpdb folder, you should be able to check the name of the db to make sure my code uses the right .mdb file and then drop my code on a page in place of yours.

Page 1

<html> 

<head> 
<meta name="GENERATOR" content="Microsoft FrontPage 6.0"> 
<meta name="ProgId" content="FrontPage.Editor.Document"> 
<title>Results</title> 
<link rel="stylesheet" type="text/css" href="http://ctdcf-web/css/dcfstyles.css"> 

</head> 

<body> 

<table> 
<tbody> 
</tbody> 
</table> 
<table> 
<tbody> 
<% 
DIM myDSN, mySQL, conntemp

myDSN ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("/fpdb/phone.mdb")


'a little function to cleanup the input
FUNCTION cleanString(textIn)
IF trim(textIn&"")>"" THEN
cleanString = trim(Replace(textIn,"'","''")
ELSE
cleanString = ""
END IF
END FUNCTION

IF Request.form("firstname")
mySQL="INSERT INTO Directory (firstname, lastname, telephone, email) VALUES ('" & cleanString(Request.form("firstName")) & "', '" & cleanString(Request.form("lastname")) & "', '" & cleanString(Request.form("telephone")) & "', '" & cleanString(Request.form("email")) & "') " 

set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN
conntemp.execute(mySQL)
conntemp.close
set conntemp=nothing
END IF

%> 
</tbody> 
</table> 



<p align="center"> </p> 



<p align="center"><span lang="en-us"><b>YOUR ENTRY HAS BEEN 
SAVED.</b></span></p> 



<p align="center"> </p> 
<p align="center"><a href="phone_frm.asp">Directory Entry Form</a></p> 
<p align="center"><a href="list.asp">Change or View All Directory</a></p> 
<p align="center"><a href="phone_search.asp">Search Phone Directory</a></p> 
<p align="center"> </p> 
<p align="center"> </p> 
<p align="center"> </p> 
</body> 
</html>


Page to view those fields:

<html> 

<head> 
<meta name="GENERATOR" content="Microsoft FrontPage 6.0"> 
<meta name="ProgId" content="FrontPage.Editor.Document"> 
<title>Results</title> 
<link rel="stylesheet" type="text/css" href="http://ctdcf-web/css/dcfstyles.css"> 

</head> 

<body> 

<%
DIM myDSN, mySQL, conntemp, rstemp, alldata

myDSN ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("/fpdb/phone.mdb")

mySQL="SELECT firstname,lastname,telephone,email FROM Directory" 

set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN
set rstemp=conntemp.execute(mySQL)

IF  rstemp.eof THEN
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
Response.write("No data found for your request.")
ELSE
alldata=rstemp.getrows
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
%>
<table border="0" width="100%">
  <tr>
    <td width="25%">First Name</td>
    <td width="25%">Last Name</td>
    <td width="25%">Telephone</td>
    <td width="25%">Email</td>
  </tr>
<%FOR i = 0 TO ubound(alldata,2)%>
  <tr>
    <td width="25%"><%=alldata(0,i)%></td>
    <td width="25%"><%=alldata(1,i)%></td>
    <td width="25%"><%=alldata(2,i)%></td>
    <td width="25%"><%=alldata(3,i)%></td>
  </tr>
</table>


<%
NEXT
END IF

%> 



<p align="center"> </p> 



<p align="center"><span lang="en-us"><b>YOUR ENTRY HAS BEEN 
SAVED.</b></span></p> 



<p align="center"> </p> 
<p align="center"><a href="phone_frm.asp">Directory Entry Form</a></p> 
<p align="center"><a href="list.asp">Change or View All Directory</a></p> 
<p align="center"><a href="phone_search.asp">Search Phone Directory</a></p> 
<p align="center"> </p> 
<p align="center"> </p> 
<p align="center"> </p> 
</body> 
</html> 


Don't be initimidated by the array "alldata"; this code is essentially puting the data in a 'spreadsheet-like' memory space and were getting to it by using arraydata(x,y) where x is the column number and y is the row number. One little caveat is that the numbers start with 0 and not 1 so the first cell of the first column is alldata(0,0) and the second column of the first row is alldata(1,0)

If you can master these 2 pages, you'll never have to use a DRW again! [:D] ANd trust me, it can enable you to do some nice DB stuff that the DRW can't even imagine. [8|] [;)]

You could do this using recordsets but I am not a fan of recordsets 'cause they keep the DB open too long IMO and that is always a consideration of mine; especially when using Access.

PS. If this is a new IIS6 install, ensure that ASP pages are enabled.

Hope it helps.




Anne Lindberg -> RE: Do FP2003 forms work without FP extensions? (7/20/2005 15:32:11)

This works! I had to add a missing parethesis and a condition to "if request("firstname") " but that might have been a test to see if I really tried this right? Anyway, I know I can do this now thanks to you!




rdouglass -> RE: Do FP2003 forms work without FP extensions? (7/20/2005 16:00:18)

quote:

might have been a test


Nope, no test. Just my poor typing and didn't test anything. Glad you caught it and I could help.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.125