navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Web Form Won't Update Access DB

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Web Form Won't Update Access DB
Page: [1] 2   next >   >>
 
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
Web Form Won't Update Access DB - 8/18/2005 14:41:22   
I'm an amatuer. But I've done it before. I can't figure out what I'm doing wrong.

I know you'll need me to post some code but I'm not sure what code you need.

PLEASE HELP!!

-E
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Web Form Won't Update Access DB - 8/18/2005 15:53:56   
quote:

but I'm not sure what code you need.
post the form (dont need the whole html page) and the page that processes the form

_____________________________

Dan

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/18/2005 15:59:04   
quote:

<%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear

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

fp_rs.Open "TRD", 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(5)
Dim arFormDBFields0(5)
Dim arFormValues0(5)

arFormFields0(0) = "Task"
arFormDBFields0(0) = "Task"
arFormValues0(0) = Request("Task")
arFormFields0(1) = "Client"
arFormDBFields0(1) = "Client"
arFormValues0(1) = Request("Client")
arFormFields0(2) = "Responsibility"
arFormDBFields0(2) = "Responsibility"
arFormValues0(2) = Request("Responsibility")
arFormFields0(3) = "Deadline"
arFormDBFields0(3) = "DeadlineDate"
arFormValues0(3) = Request("Deadline")
arFormFields0(4) = "Comments"
arFormDBFields0(4) = "Comments"
arFormValues0(4) = Request("Comments")

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0


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

fp_rs.Close
fp_conn.Close

Session("FP_SavedFields")=arFormFields0
Session("FP_SavedValues")=arFormValues0
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
Response.Redirect "trd.asp"

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>


AND

quote:

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveDatabase" SuggestedExt="asp" U-ASP-Include-Url="_fpclass/fpdbform.inc" S-DataConnection="TRD" S-RecordSource="TRD" U-Database-URL="fpdb/trd.mdb" U-Confirmation-Url="trd.asp" S-Form-Fields="Task Client Responsibility Deadline Comments" S-Form-DBFields="Task Client Responsibility DeadlineDate Comments" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" i-checksum="40548" endspan -->

(in reply to dpf)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/18/2005 16:06:19   
The title of your post uses the word Update. Are you really trying to perform an update or insert a new record. Do you get an error message?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/18/2005 16:23:01   
My apologies. I am trying to insert a new record.

I do not get an error message. It directs my browser to the confirmation page. If I manually open the database, the new record is not there.

-E

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/18/2005 18:16:47   
Likely a permissions problem. Can you verify that the fpdb folder has read, write and delete permissions granted to the Internet Guest Account?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/18/2005 19:11:36   
I would have to call my ISP, which I will do in the morning. Thanks for your help so far.

I'll likely post tomorrow to let you know what my ISP says.

(in reply to BeTheBall)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 10:47:55   
My ISP said that all the permission are granted. Now what?

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 11:34:18   
Not sure I believe them, but perhaps you can try a couple of things. Do you have any pages that display records from the db? If so, do they work?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 11:36:15   
Yes. I have a page that displays the results. And it does work.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 11:47:31   
Can you post the full code for the page that inserts the record, top to bottom?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 11:49:40   
Here it is.

quote:

<%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear

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

fp_rs.Open "BillCom", 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(1)
Dim arFormDBFields0(1)
Dim arFormValues0(1)

arFormFields0(0) = "comments"
arFormDBFields0(0) = "Comments"
arFormValues0(0) = Request("comments")

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0

If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"), "Browser_type"
End If
If Request.ServerVariables("REMOTE_HOST") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"), "IPAddress"
End If
FP_SaveFieldToDB fp_rs, Now, "Date"
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

Session("FP_SavedFields")=arFormFields0
Session("FP_SavedValues")=arFormValues0
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
Response.Redirect "bill.asp"

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>

<body link="#94594C" vlink="#94594C" alink="#FEBA00" text="#94594C" bgcolor="#FFFFFF" style="font-family: Arial Narrow; font-size: 12pt">

<div align="center">
<table border="0" cellpadding="5" cellspacing="5" width="632" height="547">
<!-- MSTableType="layout" -->
<tr>
<td colspan="2" height="75" align="center">
<!-- MSCellType="ContentHead" -->
<div align="left">
<!--webbot CLIENTSIDE
bot="Ws3FpEx" MODULEID="'lnf (project)\logo.xws'" PREVIEW="<img src='images/logo.gif?006EEB98' editor='Webstyle3' border='0'>" startspan -->
<img src="images/logo.gif?006EEB98" editor="Webstyle3" border="0">
<!--webbot
bot="Ws3FpEx" endspan i-checksum="43076" -->
</div>
</td>
</tr>
<tr>
<td valign="top" rowspan="2" width="109">
<!-- MSCellType="NavBody" -->
<div align="right">
<!--webbot CLIENTSIDE
bot="Ws3FpEx" MODULEID="'lnf (project)\lnf_off.xws'" PREVIEW="<img src='images/lnf.gif?00701F9E' editor='Webstyle3' border='0'>" startspan -->
<script src="xaramenu.js"></script><script webstyle3 src="images/lnf.js"></script><noscript><img src="images/lnf.gif?00701F9E" editor="Webstyle3"></noscript>
<!--webbot
bot="Ws3FpEx" endspan i-checksum="8988" -->
</div>
</td>
<td valign="top" height="49">
<!-- MSCellType="ContentHead2" -->
 </td>
</tr>
<tr>
<td valign="top" height="423" width="523">
<!-- MSCellType="ContentBody" -->
 <p>
<!--webbot CLIENTSIDE
bot="Ws3FpEx" MODULEID="'LnF (Project)\the_thrill.xws'" PREVIEW="<img src='images/the_thrill.gif?05695088' editor='Webstyle3' border='0'>" startspan --><img src="images/the_thrill.gif?05695088" editor="Webstyle3" border="0">
<!--webbot
bot="Ws3FpEx" endspan i-checksum="16604" --></p>
<p><img border="0" src="images/bandfiles/bill.jpg" align="left">bill is a
master of the strat-o-caster (that rhymed).  He loves his two-pack of abs
and hangs out at the animal shelter every sunday hoping to figure out what
they really mean by "puppy love".</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Comments</p>
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveDatabase" suggestedext="asp" s-dataconnection="guestbook" s-recordsource="BillCom" u-database-url="fpdb/guestbook.mdb" u-confirmation-url="bill.asp" s-builtin-fields="HTTP_USER_AGENT REMOTE_HOST Timestamp REMOTE_USER" s-builtin-dbfields="Browser_type IPAddress Date User_name" s-form-fields="comments" s-form-dbfields="Comments" U-ASP-Include-Url="_fpclass/fpdbform.inc" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" i-checksum="40548" endspan --><p>
<textarea rows="5" name="comments" cols="45"></textarea></p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
<!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Date,Comments,IPAddress" s-columntypes="3,135,203,202" s-dataconnection="guestbook" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="FALSE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="BillComQuery" s-displaycolumns="Date,Comments" s-criteria s-order s-sql="SELECT * FROM BillComQuery" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr></table>" startspan --><!--#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="SELECT * FROM BillComQuery"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="guestbook"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&Date=135&Comments=203&IPAddress=202&"
fp_iDisplayCols=2
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="46260" --><p>
<!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Date,Comments,IPAddress" s-column="Date" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Date<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"Date")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="3267" --></p>
<p>
<!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Date,Comments,IPAddress" s-column="Comments" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Comments<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"Comments")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16369" --><br>
<hr></p>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" --><p> </td>
</tr>
</table>
</div>
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=523698;
var sc_partition=3;
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script>
<!-- End of StatCounter Code -->
</body>

</html>

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 12:09:08   
It appears to be in order. A good test of the permissions would be to create a test page to perform an insert via a SQL statement as opposed to the method the Send to Database option uses. Open a new page and then insert a database results region. In step 1, choose your connection (guestbook). Then in step 2, choose custom query and click the Edit button. In the resulting textarea insert a SQL statement of:

INSERT INTO BillCom (Comments) VALUES ('This is a test!')

Then finish the remaining steps of the wizard (Doesn't matter what options you choose). Save the page with a .asp extension and then test it in a browser to see if a record is inserted.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 12:16:40   
A record was not inserted. I did get the following on the test.asp page, which may be normal...

quote:

Database Results Wizard Error
The operation failed. If this continues, please contact your server administrator.



(in reply to BeTheBall)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 12:18:09   
Could there possibly be an error with the db (field names, etc....)?

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 12:22:34   
quote:

The FP2003 code has changed slightly. To see the true error, open the hidden folder /_fpclass/ and edit the fpdbrgn1.inc file

At about line 19, change :

fp_DEBUG = False

to :

fp_DEBUG = True


Do the above and then retest the page. That will give us a truer error message.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 12:26:17   
Error Message:

quote:

Database Results Wizard Error
Description: Operation must use an updateable query.
Number: -2147467259 (0x80004005)
Source: Microsoft JET Database Engine

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 13:08:17   
That my friend is a permissions-related error.

One thing that works on some servers is to open the fpdb folder on the live site and then import a small database from say your desktop.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 14:33:13   
Thanks. I'll give it a try.

(in reply to BeTheBall)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 14:56:14   
Duane:

You da man.

Thank you so much for helping me.

-D

(in reply to BeTheBall)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 15:54:33   
Ok. That only worked for one of the webs I was having a problem with.

I have another web tht I'm trying to do the same thing with. This form has a few more fields and that might be causing the problem (I'm guessing here). Here is the source code:

quote:

<%
' FP_ASP ASP Automatically generated by a FrontPage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear

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

fp_rs.Open "TRD", 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) = "Completed"
arFormDBFields0(0) = "Completed"
arFormValues0(0) = Request("Completed")
arFormFields0(1) = "Task"
arFormDBFields0(1) = "Task"
arFormValues0(1) = Request("Task")
arFormFields0(2) = "Client"
arFormDBFields0(2) = "Client"
arFormValues0(2) = Request("Client")
arFormFields0(3) = "Responsibility"
arFormDBFields0(3) = "Responsibility"
arFormValues0(3) = Request("Responsibility")
arFormFields0(4) = "Deadline"
arFormDBFields0(4) = "Deadline"
arFormValues0(4) = Request("Deadline")
arFormFields0(5) = "Comments"
arFormDBFields0(5) = "Comments"
arFormValues0(5) = Request("Comments")

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0


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

fp_rs.Close
fp_conn.Close

Session("FP_SavedFields")=arFormFields0
Session("FP_SavedValues")=arFormValues0
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
Response.Redirect "success.asp"

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>

<body style="font-family: Arial; font-size: 10pt" text="#000080">
<div align="center">
<table border="1" cellpadding="5" cellspacing="5" width="647" height="547" bordercolor="#C0C0C0">
<!-- MSTableType="layout" -->
<tr>
<td valign="top" height="547" width="647">
<!-- MSCellType="ContentBody" -->
<p> </p>
<p><font size="6">PMYCO TRD</font></p>
<p> </p>
<p><font size="2">Add New Task - <a href="trd.asp">View Current TRD Report</a></font></p>
<form name="trd" method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveDatabase" SuggestedExt="asp" S-DataConnection="trd" S-RecordSource="TRD" U-Database-URL="fpdb/trd.mdb" U-Confirmation-Url="success.asp" S-Form-Fields="Completed Task Client Responsibility Deadline Comments" S-Form-DBFields="Completed Task Client Responsibility Deadline Comments" U-ASP-Include-Url="_fpclass/fpdbform.inc" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan i-checksum="40548" -->
<p><font size="2">Client<br></font>
<input type="text" name="Client" size="9" tabindex="1"></p>
<p><font size="2">Task<br></font>
<input type="text" name="Task" size="55" tabindex="2"></p>
<p><font size="2">Responsibility<br>
<select size="1" name="Responsibility">
<option>Select One</option>
<option value="PY">PY</option>
<option value="ES">ES</option>
<option value="PY/ES">PY/ES</option>
</select></font></p>
<p><font size="2">Deadline Date<br></font>
<input type="text" name="Deadline" size="14" tabindex="4"></p>
<p><font size="2">Comments<br></font>
<textarea rows="4" name="Comments" cols="36" tabindex="5"></textarea></p>
<p><font size="2">Completed
<input type="checkbox" name="Completed" value="On/Off"></font></p>
<p><input type="submit" value="Submit Form"></p>
</form>
<p> </p></td>
</tr>
</table>
</div>

</body>

</html>


Does anything stand out to you?


(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 16:10:55   
Same problem? I mean do you get an error or just no record? Is the db in the same fpdb folder as the other one, or is it a different site altogether? If different, did you try the same technique, i.e., importing a small db?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 16:13:49   
It is a completely separate site.

I tried the importing thing. It's the same error message:

quote:

Database Results Wizard Error
Description: Operation must use an updateable query.
Number: -2147467259 (0x80004005)
Source: Microsoft JET Database Engine


My hosting service is sure all the permissions are set. Unfortunately, I am not able to verify this myself....as far as I know.

Any ideas?

-D

(in reply to BeTheBall)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 16:16:14   
I was wondering if some of the field types in my db are not set up correctly or my form is not set to put the correct info type in the field.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 16:17:48   
Do you have a link?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 16:24:02   
http://www.philipmyoungcompany.com/trd/enter.asp

The password for the data results page will be "pmyco" without the quotes.

All of the data in here is test data so there really isn't anything sensitive.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 16:27:51   
OK, I get no error when I submit the form, but get directed to the confirmation page. I just entered "test" in every field except of course the dropdown. Did the record get added or not?

By the way, I didn't see an area that asked for a password? Should I have?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
destiple

 

Posts: 22
Joined: 8/18/2005
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 16:32:51   
The record did not get added.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 16:38:46   
I still suspect permissions, but we can rule out a few things first.

Can you open the database table and list here each field name and its corresponding data type?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to destiple)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Web Form Won't Update Access DB - 8/23/2005 16:40:51   
What happens when you run this code instead?

<%
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear

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

fp_rs.Open "TRD", 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) = "Completed"
arFormDBFields0(0) = "Completed"
arFormValues0(0) = Request("Completed")
arFormFields0(1) = "Task"
arFormDBFields0(1) = "Task"
arFormValues0(1) = Request("Task")
arFormFields0(2) = "Client"
arFormDBFields0(2) = "Client"
arFormValues0(2) = Request("Client")
arFormFields0(3) = "Responsibility"
arFormDBFields0(3) = "Responsibility"
arFormValues0(3) = Request("Responsibility")
arFormFields0(4) = "Deadline"
arFormDBFields0(4) = "Deadline"
arFormValues0(4) = Request("Deadline")
arFormFields0(5) = "Comments"
arFormDBFields0(5) = "Comments"
arFormValues0(5) = Request("Comments")

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0


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

fp_rs.Close
fp_conn.Close

Session("FP_SavedFields")=arFormFields0
Session("FP_SavedValues")=arFormValues0
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
Response.Redirect "success.asp"

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>

<body style="font-family: Arial; font-size: 10pt" text="#000080">
<div align="center">
<table border="1" cellpadding="5" cellspacing="5" width="647" height="547" bordercolor="#C0C0C0">
<!-- MSTableType="layout" -->
<tr>
<td valign="top" height="547" width="647">
<!-- MSCellType="ContentBody" -->
<p> </p>
<p><font size="6">PMYCO TRD</font></p>
<p> </p>
<p><font size="2">Add New Task - <a href="trd.asp">View Current TRD Report</a></font></p>
<form name="trd" method="POST" action="--WEBBOT-SELF--">
<!--#include file="_fpclass/fpdbform.inc"-->
<p><font size="2">Client<br></font>
<input type="text" name="Client" size="9" tabindex="1"></p>
<p><font size="2">Task<br></font>
<input type="text" name="Task" size="55" tabindex="2"></p>
<p><font size="2">Responsibility<br>
<select size="1" name="Responsibility">
<option>Select One</option>
<option value="PY">PY</option>
<option value="ES">ES</option>
<option value="PY/ES">PY/ES</option>
</select></font></p>
<p><font size="2">Deadline Date<br></font>
<input type="text" name="Deadline" size="14" tabindex="4"></p>
<p><font size="2">Comments<br></font>
<textarea rows="4" name="Comments" cols="36" tabindex="5"></textarea></p>
<p><font size="2">Completed
<input type="checkbox" name="Completed" value="On/Off"></font></p>
<p><input type="submit" value="Submit Form"></p>
</form>
<p> </p></td>
</tr>
</table>
</div>

</body>

</html>


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to BeTheBall)
Page:   [1] 2   next >   >>

All Forums >> Web Development >> ASP and Database >> Web Form Won't Update Access DB
Page: [1] 2   next >   >>
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts