Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Troubleshooting (For New Users) 1

Status
Not open for further replies.

OrWolf

MIS
Mar 19, 2001
291
I just created a form using the wizards in FrontPage 2000 and connected it to my Access 2000 database. I mapped all of the saved fields and additional fields to the table in my database. When I complete the form in IE5.5 and click submit, the FP default confirmation page pops up confirming my entries. The only option available is to return the form and I select that.

After all of that, no matter what I seem to do, my database doesn't create a new record. In viewing the HTML I would expect the page to error if it were a connection error, but no error ever pops up. How can I figure out what I've done wrong????

Any suggestion would be extremely appreciated!
 
look at the code, and be sure that the recordset.update method is being called after the recordset.addnew method has been called, and the new values have been assigned to the recordset.

If the .update method isn't called, then the changes have only been made to the recordset, and NOT to the database, itself.

That's the most common error with this type of problem.
 
Both instructions are listed, but don't appear to be working. Is there a way to display something to the screen during this process that would allow me to see where the breakdown might be occurring? The applicable portion of the code is as follows:


fp_rs.Open "EDF", 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(21)
Dim arFormDBFields0(21)

arFormFields0(0) = "JointSystem"
arFormDBFields0(0) = "JointSystem"


. . . . (Additional fields here)


arFormFields0(20) = "DescLocation"
arFormDBFields0(20) = "DescLocation"

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0

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

fp_rs.Update
FP_DumpError strErrorUrl, &quot;Cannot update the database&quot;

fp_rs.Close
fp_conn.Close

 
In reviewing my code I noticed the following reference to a 'VTI-GROUP'. Should the reference be something else, such as the name of my form?


If Request.ServerVariables(&quot;REQUEST_METHOD&quot;) = &quot;POST&quot; Then
If Request.Form(&quot;VTI-GROUP&quot;) = &quot;0&quot; Then
Err.Clear
 
fp_rs.AddNew


I don't see one place in the code that you are adding anything to the above referenced object -- you addnew, and you update when you are done, but no where in between do i see you assigning values to something like:

fp_rs(&quot;fieldName&quot;) = value

See what I mean??? doesn't look like you are doing anything at all to it -- and that would explain the lack of action in the database...

You said the above was created by frontPage2000 -- doesn't look like it's doing it's job to me...


 
I believe that FP2K is using a single save function with 'FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0'. However it really doesn't seem to be working. I'm trying to trudge through some sample code I found on stardeveloper.com right now. However with 21 fields, it's taking some time.

Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top