Again I'm new to this, so hope you will be patient. You did re-inforce my thoughts on the server side regarding the DSN and pointer (i.e. code) to the Access database.You bring up some points which I thought about, but was not sure on how to approach. This may be just semantics, then maybe not. First my objective is simly have the web pages on the host's server. I was going to just develop on my PC then upload to web. There is a problem here though. I think in terms of the old DOS directory tree when thinking of paths or URL's of a web site. I'm sure there are flaws in this concept, but the directory/path of the database is at the same level as the absolute path of the domain. See my item #2 on 1st post. Unless I'm missing something here FP2k through the user interface can NOT see outside (i.e. next to or below/higher depending on how you look at it whether the tree is upside down or right side up) the web path/directory which is open. What this issue was telling me was what I believe you are trying to tell me which is I would have to edit live. I tried this with FP2k and for some reason couldn't make the connection.
I've never done this before so I'm probably missing some steps. I use a dial up connection. I am trying WS_FTP Pro for FTP'ing, but have only used FP2k's publishing program. I just got FP2k a few months ago. When I try to make a direct connection to the web site I receive a message which reads "Could not find a web server at 'DOMAINxxx.com' on port 80. Please check to make sure that the web server name is valid and your proxy settings are set correctly. If you are sure everything is correct, the web server may be temporarily out of service." Do I need to use the FTP program for FP2k to work from the web? Probably not, but I am not sure.
You point out the DSN must point to both the directory and database. See items #1 & #2 on original post. I create the DSN name and named the database in the hosting company's automated control panel. I am assuming it works properly.
I am testing to see if the data I put into the form makes it to the Access table. It did not test successfully either from the web or on my PC. On my PC there was an error message, see large paragraph after item #4 on original post. When I tested on the web there was no error message and the results page opened up.
What is DRW's?
I haven't written any custom code. I did look at the html written by FP2k. I can follow the logic on the code FP2k wrote and it seems logical, but again I'm new here so it is most likely I am buying lunch here. Meaning: THIS IS THE PROBLEM!
-------------------------------------------
Here is the html code on the form:
<form method="POST" action="--WEBBOT-SELF--" name="Contact" onSubmit="">
<!--webbot bot="SaveDatabase" startspan SuggestedExt="asp"
U-ASP-Include-Url="_fpclass/fpdbform.inc" S-DataConnection="contact"
S-RecordSource="contact" U-Confirmation-Url="results/results.asp"
S-Form-Fields="S1 T2 T3 T4 T5 T1"
S-Form-DBFields="comments lname co_name email telephone fname" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="_fpclass/fpdbform.inc"--><!--webbot
bot="SaveDatabase" endspan -->
<p>First
Name: <input type="text" name="T1" size="20">
Last Name: <input type="text" name="T2" size="20"><br>
Company Name: <input type="text" name="T3" size="56"><br>
Email Address: <input type="text" name="T4" size="56"><br>
Telephone:
<input type="text" name="T5" size="56"><br>
Comments:
<textarea rows="2" name="S1" cols="48"></textarea><br>
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
--------------------------------------------
Here is the ASP code generated by FP2K:
<%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.
On Error Resume Next
strErrorUrl = ""
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
Err.Clear
Set fp_conn = Server.CreateObject("ADODB.Connection")
FP_DumpError strErrorUrl, "Cannot create connection"
Set fp_rs = Server.CreateObject("ADODB.Recordset")
FP_DumpError strErrorUrl, "Cannot create record set"
fp_conn.Open Application("contact_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"
fp_rs.Open "contact", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
FP_DumpError strErrorUrl, "Cannot open record set"
fp_rs.AddNew
FP_DumpError strErrorUrl, "Cannot add new record set to the database"
Dim arFormFields0(6)
Dim arFormDBFields0(6)
arFormFields0(0) = "S1"
arFormDBFields0(0) = "comments"
arFormFields0(1) = "T2"
arFormDBFields0(1) = "lname"
arFormFields0(2) = "T3"
arFormDBFields0(2) = "co_name"
arFormFields0(3) = "T4"
arFormDBFields0(3) = "email"
arFormFields0(4) = "T5"
arFormDBFields0(4) = "telephone"
arFormFields0(5) = "T1"
arFormDBFields0(5) = "fname"
FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
fp_rs.Update
FP_DumpError strErrorUrl, "Cannot update the database"
fp_rs.Close
fp_conn.Close
Response.Redirect "results/results.asp"
End If
End If
%>
---------------------------------------------
If you could help. Thanks!
------------------
GW