Access Database Form Submission problems in FP2003

B

Bill M

I have created an asp page in FP2003, inserted a form and manually designed
various drop-boxes to answer questions. I have given each of these drop-down
menus a form field name and configured the fields to be "required", and that
the first selection was not permissible.

I created a database through the options button, confirmed all the saved
fields matched up to columns in the access database it created, and made sure
I wasn't getting any errors regarding the ODBC connection, which I verified
through that same tab.

When I submit the form, the custom confirmation page comes up, saying that
my form was successfully submitted. When I look at the actual Access db
file, there is no data received.

I have had similar problems in the past, and usually found it to be related
to not having the mdb file in the fpdb folder found directly under wwwroot.
This is not the case this time.

I even tried using the DIW to create a submission page and set it up the
same way, but let it create a new database. This put a new fpdb folder as a
subfolder of the folder it created, called survey. That one gives me a send
failure message, which I custom created, every time.

Also, for background info sake, I am using FP2003 and running this form on a
W2K Pro workstation, using IIS 5.0. Other database forms are working just
fine and submitting forms to databases located within the same fpdb folder.

I am at whit's end here and could really use some guidance. Any help the
community can provide would be greatly appreciated. I just want to know what
I could be doing wrong.
 
S

Stefan B Rusynko

Post a snippet of your asp code that is used to update the DB

Most often failure to write when you have a connection verified is due to:
- field / data type mismatches
- use for reserved or illegal names for field names

Start by attempting to write 1 field at a time
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have created an asp page in FP2003, inserted a form and manually designed
| various drop-boxes to answer questions. I have given each of these drop-down
| menus a form field name and configured the fields to be "required", and that
| the first selection was not permissible.
|
| I created a database through the options button, confirmed all the saved
| fields matched up to columns in the access database it created, and made sure
| I wasn't getting any errors regarding the ODBC connection, which I verified
| through that same tab.
|
| When I submit the form, the custom confirmation page comes up, saying that
| my form was successfully submitted. When I look at the actual Access db
| file, there is no data received.
|
| I have had similar problems in the past, and usually found it to be related
| to not having the mdb file in the fpdb folder found directly under wwwroot.
| This is not the case this time.
|
| I even tried using the DIW to create a submission page and set it up the
| same way, but let it create a new database. This put a new fpdb folder as a
| subfolder of the folder it created, called survey. That one gives me a send
| failure message, which I custom created, every time.
|
| Also, for background info sake, I am using FP2003 and running this form on a
| W2K Pro workstation, using IIS 5.0. Other database forms are working just
| fine and submitting forms to databases located within the same fpdb folder.
|
| I am at whit's end here and could really use some guidance. Any help the
| community can provide would be greatly appreciated. I just want to know what
| I could be doing wrong.
| --
| Bill M
 
B

Bill M

Stephan,

I followed your suggestion and tried to create the form 1 field at a time.
With that, I still experienced the same problem. I even created a brand new
database. Below is the requested code:

<%
' 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("DSSSurvey_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"

fp_rs.Open "Results", 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)
Dim arFormValues0(6)

arFormFields0(0) = "Communication"
arFormDBFields0(0) = "Communication"
arFormValues0(0) = Request("Communication")
arFormFields0(1) = "FirstCallResolution"
arFormDBFields0(1) = "FirstCallResolution"
arFormValues0(1) = Request("FirstCallResolution")
arFormFields0(2) = "HoldTime"
arFormDBFields0(2) = "HoldTime"
arFormValues0(2) = Request("HoldTime")
arFormFields0(3) = "TicketResponse"
arFormDBFields0(3) = "TicketResponse"
arFormValues0(3) = Request("TicketResponse")
arFormFields0(4) = "ProblemNumber"
arFormDBFields0(4) = "ProblemNumber"
arFormValues0(4) = Request("ProblemNumber")
arFormFields0(5) = "Comments"
arFormDBFields0(5) = "Comments"
arFormValues0(5) = Request("Comments")

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0

If Request.ServerVariables("REMOTE_HOST") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"),
"Remote_computer_name"
End If
If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"),
"Browser_type"
End If
FP_SaveFieldToDB fp_rs, Now, "Timestamp"
If Request.ServerVariables("REMOTE_USER") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name"
End If

fp_rs.Update
FP_DumpError strErrorUrl, "Cannot update the database"

fp_rs.Close
fp_conn.Close

FP_FormConfirmation "text/html; charset=windows-1252",_
"Form Confirmation",_
"Thank you for submitting the following information:",_
"DSSSurvey.asp",_
"Return to the form."

End If
End If

%>

Please advise if this was not what you are looking for. Any assistance you
or the community can provide is greatly appreciated.
--
Bill M


Stefan B Rusynko said:
Post a snippet of your asp code that is used to update the DB

Most often failure to write when you have a connection verified is due to:
- field / data type mismatches
- use for reserved or illegal names for field names

Start by attempting to write 1 field at a time
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have created an asp page in FP2003, inserted a form and manually designed
| various drop-boxes to answer questions. I have given each of these drop-down
| menus a form field name and configured the fields to be "required", and that
| the first selection was not permissible.
|
| I created a database through the options button, confirmed all the saved
| fields matched up to columns in the access database it created, and made sure
| I wasn't getting any errors regarding the ODBC connection, which I verified
| through that same tab.
|
| When I submit the form, the custom confirmation page comes up, saying that
| my form was successfully submitted. When I look at the actual Access db
| file, there is no data received.
|
| I have had similar problems in the past, and usually found it to be related
| to not having the mdb file in the fpdb folder found directly under wwwroot.
| This is not the case this time.
|
| I even tried using the DIW to create a submission page and set it up the
| same way, but let it create a new database. This put a new fpdb folder as a
| subfolder of the folder it created, called survey. That one gives me a send
| failure message, which I custom created, every time.
|
| Also, for background info sake, I am using FP2003 and running this form on a
| W2K Pro workstation, using IIS 5.0. Other database forms are working just
| fine and submitting forms to databases located within the same fpdb folder.
|
| I am at whit's end here and could really use some guidance. Any help the
| community can provide would be greatly appreciated. I just want to know what
| I could be doing wrong.
| --
| Bill M
 
S

Stefan B Rusynko

That is not your code
That is the std DBRW code generated when you select Send to DB from a form
Make sure After you Select or Create the DB (from Form Properties (Send to DB) Options
- in your Dialog you then select Update DB

Also if any of the form fields or DB fields are not text fields your form validation needs to be set to only allow the data types in
your DB
For an easier way to use the DBRW to maintain data see
http://home.att.net/~codelibrary/FrontPage/drw.htm

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stephan,
|
| I followed your suggestion and tried to create the form 1 field at a time.
| With that, I still experienced the same problem. I even created a brand new
| database. Below is the requested code:
|
| <%
| ' 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("DSSSurvey_ConnectionString")
| FP_DumpError strErrorUrl, "Cannot open database"
|
| fp_rs.Open "Results", 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)
| Dim arFormValues0(6)
|
| arFormFields0(0) = "Communication"
| arFormDBFields0(0) = "Communication"
| arFormValues0(0) = Request("Communication")
| arFormFields0(1) = "FirstCallResolution"
| arFormDBFields0(1) = "FirstCallResolution"
| arFormValues0(1) = Request("FirstCallResolution")
| arFormFields0(2) = "HoldTime"
| arFormDBFields0(2) = "HoldTime"
| arFormValues0(2) = Request("HoldTime")
| arFormFields0(3) = "TicketResponse"
| arFormDBFields0(3) = "TicketResponse"
| arFormValues0(3) = Request("TicketResponse")
| arFormFields0(4) = "ProblemNumber"
| arFormDBFields0(4) = "ProblemNumber"
| arFormValues0(4) = Request("ProblemNumber")
| arFormFields0(5) = "Comments"
| arFormDBFields0(5) = "Comments"
| arFormValues0(5) = Request("Comments")
|
| FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
|
| If Request.ServerVariables("REMOTE_HOST") <> "" Then
| FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"),
| "Remote_computer_name"
| End If
| If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
| FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"),
| "Browser_type"
| End If
| FP_SaveFieldToDB fp_rs, Now, "Timestamp"
| If Request.ServerVariables("REMOTE_USER") <> "" Then
| FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name"
| End If
|
| fp_rs.Update
| FP_DumpError strErrorUrl, "Cannot update the database"
|
| fp_rs.Close
| fp_conn.Close
|
| FP_FormConfirmation "text/html; charset=windows-1252",_
| "Form Confirmation",_
| "Thank you for submitting the following information:",_
| "DSSSurvey.asp",_
| "Return to the form."
|
| End If
| End If
|
| %>
|
| Please advise if this was not what you are looking for. Any assistance you
| or the community can provide is greatly appreciated.
| --
| Bill M
|
|
| "Stefan B Rusynko" wrote:
|
| > Post a snippet of your asp code that is used to update the DB
| >
| > Most often failure to write when you have a connection verified is due to:
| > - field / data type mismatches
| > - use for reserved or illegal names for field names
| >
| > Start by attempting to write 1 field at a time
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > |I have created an asp page in FP2003, inserted a form and manually designed
| > | various drop-boxes to answer questions. I have given each of these drop-down
| > | menus a form field name and configured the fields to be "required", and that
| > | the first selection was not permissible.
| > |
| > | I created a database through the options button, confirmed all the saved
| > | fields matched up to columns in the access database it created, and made sure
| > | I wasn't getting any errors regarding the ODBC connection, which I verified
| > | through that same tab.
| > |
| > | When I submit the form, the custom confirmation page comes up, saying that
| > | my form was successfully submitted. When I look at the actual Access db
| > | file, there is no data received.
| > |
| > | I have had similar problems in the past, and usually found it to be related
| > | to not having the mdb file in the fpdb folder found directly under wwwroot.
| > | This is not the case this time.
| > |
| > | I even tried using the DIW to create a submission page and set it up the
| > | same way, but let it create a new database. This put a new fpdb folder as a
| > | subfolder of the folder it created, called survey. That one gives me a send
| > | failure message, which I custom created, every time.
| > |
| > | Also, for background info sake, I am using FP2003 and running this form on a
| > | W2K Pro workstation, using IIS 5.0. Other database forms are working just
| > | fine and submitting forms to databases located within the same fpdb folder.
| > |
| > | I am at whit's end here and could really use some guidance. Any help the
| > | community can provide would be greatly appreciated. I just want to know what
| > | I could be doing wrong.
| > | --
| > | Bill M
| >
| >
| >
 

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