|
| |
|
|
mjmtravel
Posts: 257 Joined: 7/30/2006 Status: offline
|
Server Error - 7/22/2008 20:55:59
Yes I know this problem is all over the forum, but I'm still stuck and I don't know where else to turn. I'm running front page 2003. I have the friendly errors unchecked, I have fp debug set as true. I still get the 500 server error with no description of the error. Next I used Spooky's older version of front page fp class files and published them. Same thing. Read that publishing isn't the best way and deleted the files on the host and upload the older version of the files. Still the same error. I have this problem each time I do a new website with a access database, sometimes it works smooth with the older files and sometimes I only have to set debug as true. I know I can fix a lot of the errors if I know what they are!! Does anyone have any ideas as to what I can do? Its really frustrating each time I do a new database with a new website. Thanks in advance.
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Server Error - 7/24/2008 18:51:08
Do you have a link to a page that is throwing the error?
_____________________________
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.
|
|
|
|
mjmtravel
Posts: 257 Joined: 7/30/2006 Status: offline
|
RE: Server Error - 7/24/2008 21:07:11
Duane I got past the 500 internal server error for now. I'm doing the update a database with the link, edit and update. I get as far as the update page now, except I'm getting this error. Database Results Wizard Error Description: Parameter ?_1 has no default value. Number: -2147217904 (0x80040E10) Source: Microsoft JET Database Engine One or more form fields were empty. You should provide default values for all form fields that are used in the query. In my database I have defaults set up in every field, all set at zero, my defaults in the queries are set for the field I want to update. Here is the url, www coastal creators.com, just click on equipment/propane forklifts and the edit in the tables. I'm desperately trying to understand if its my coding all of the time or the way I'm treating the code on the spooky diet. I look at my other database searches and try to match to them because they are working, but still cannot figure it out. Thanks again
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Server Error - 7/24/2008 21:11:27
No link. What is the SQL for the update? Also, post the code for the edit form.
_____________________________
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.
|
|
|
|
mjmtravel
Posts: 257 Joined: 7/30/2006 Status: offline
|
RE: Server Error - 7/24/2008 21:15:40
Duane Here is what I have. <%
fp_sQry="SELECT * FROM Equipment WHERE (TruckID = ::TruckID::)"
fp_sDefault="Category"
fp_sNoRecords="No records returned."
fp_sDataConn="TimeBilling"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&TruckID=3&Photo=202&Category=202&Make=202&Model=202&Capacity=202&SerialNumber=202&Description=202&PurchasePrice=202&OnSalePrice=202&CategoryID=3&Edit=202&"
fp_iDisplayCols=11
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<table BORDER="0">
<tr>
<td><b>Photo:</b></td>
<td>
<input TYPE="TEXT" NAME="Photo" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"Photo")%>"></td>
</tr>
<tr>
<td><b>Category:</b></td>
<td>
<input TYPE="TEXT" NAME="Category" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"Category")%>"></td>
</tr>
<tr>
<td><b>Make:</b></td>
<td>
<input TYPE="TEXT" NAME="Make" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"Make")%>"></td>
</tr>
<tr>
<td><b>Model:</b></td>
<td>
<input TYPE="TEXT" NAME="Model" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"Model")%>"></td>
</tr>
<tr>
<td><b>Capacity:</b></td>
<td>
<input TYPE="TEXT" NAME="Capacity" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"Capacity")%>"></td>
</tr>
<tr>
<td><b>SerialNumber:</b></td>
<td>
<input TYPE="TEXT" NAME="SerialNumber" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"SerialNumber")%>"></td>
</tr>
<tr>
<td><b>Description:</b></td>
<td>
<input TYPE="TEXT" NAME="Description" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"Description")%>"></td>
</tr>
<tr>
<td><b>PurchasePrice:</b></td>
<td>
<input TYPE="TEXT" NAME="PurchasePrice" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"PurchasePrice")%>"></td>
</tr>
<tr>
<td><b>OnSalePrice:</b></td>
<td>
<input TYPE="TEXT" NAME="OnSalePrice" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"OnSalePrice")%>"></td>
</tr>
<tr>
<td><b>CategoryID:</b></td>
<td>
<input TYPE="TEXT" NAME="CategoryID" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"CategoryID")%>"></td>
</tr>
<tr>
<td COLSPAN="2"><br>
<input TYPE="submit" NAME="fp_submit" value="Update"><input TYPE="Reset" NAME="fp_reset"></td>
</tr>
</table>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
<div align="left">
</div>
<p align="center"> </p>
<p align="center">
</p>
<input type="hidden" name="CategoryID" value="<%=Request("CategoryID")%>">
</form></div>
UPDATE <% end if %>
<%
fp_sQry="UPDATE Equipment SET TruckID = '::TruckID::', Photo = '::Photo::', Category = '::Category::', Make = '::Make::', Model = '::Model::', Capacity = '::Capacity::', SerialNumber = '::SerialNumber::', Description = '::Description::', PurchasePrice = '::PurchasePrice::', OnSalePrice = '::OnSalePrice::' WHERE CategoryID = '::CategoryID::'"
fp_sDefault="Category"
fp_sNoRecords="Your Equipment Has Been Updated, Please wait a moment!"
fp_sDataConn="TimeBilling"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&TruckID=3&Photo=202&Category=202&Make=202&Model=202&Capacity=202&SerialNumber=202&Description=202&PurchasePrice=202&OnSalePrice=202&CategoryID=3&Edit=202&"
fp_iDisplayCols=12
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<table BORDER="1" width="406">
< Message edited by BeTheBall -- 7/24/2008 23:23:31 >
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Server Error - 7/24/2008 23:39:33
OK. I see a couple of problems. First, you have a visible field and a hidden field both named CategoryID. So, when you get to your UPDATE page, the SQL has no idea which of those fields to use. I would eliminate the hidden field and then make the visible one hidden. So in essence, this: <td><b>CategoryID:</b></td>
<td><input TYPE="TEXT" NAME="CategoryID" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"CategoryID")%>"></td>
</tr>
<tr>
<td COLSPAN="2"><br>
<input TYPE="submit" NAME="fp_submit" value="Update"><input TYPE="Reset" NAME="fp_reset"></td>
</tr>
</table>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
<div align="left">
</div>
<p align="center"> </p>
<p align="center">
</p>
<input type="hidden" name="CategoryID" value="<%=Request("CategoryID")%>">
becomes this: <td><b>CategoryID:</b></td>
<td><input TYPE="hidden" NAME="CategoryID" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"CategoryID")%>"></td>
</tr>
<tr>
<td COLSPAN="2"><br>
<input TYPE="submit" NAME="fp_submit" value="Update"><input TYPE="Reset" NAME="fp_reset"></td>
</tr>
</table>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
<div align="left">
</div>
<p align="center"> </p>
<p align="center">
</p>
Also, it appears that TruckID and CategoryID are numeric fields. This means that the values passed to the SQL should not have single quotes around them. Your SQL should be: fp_sQry="UPDATE Equipment SET TruckID = ::TruckID::, Photo = '::Photo::', Category = '::Category::', Make = '::Make::', Model = '::Model::', Capacity = '::Capacity::', SerialNumber = '::SerialNumber::', Description = '::Description::', PurchasePrice = '::PurchasePrice::', OnSalePrice = '::OnSalePrice::' WHERE CategoryID = ::CategoryID::" See if that gets you anywhere.
_____________________________
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.
|
|
|
|
mjmtravel
Posts: 257 Joined: 7/30/2006 Status: offline
|
RE: Server Error - 7/28/2008 20:49:21
Duane I tried it that way and still got the parameter 1? missing. I went through this link step by step http://www.frontpagemagic.com/DRW/Add-Edit-Delete/EditRecord/index.asp#Step2 and I almost have it I think except when I get to the update page it says my truckID is not editable. Database Results Wizard Error Description: Cannot update 'TruckID'; field not updateable. Number: -2147217887 (0x80040E21) Source: Microsoft JET Database Engine I'm using TruckID field being passed all the way and it is the field that is set by auto number with each piece of equipment I create. Do I need to use another type field to update. On the edit page it does pull up each truck individually to edit. Does that make sense? This is also spooky login protected page so not just anyone can click on edit. here is the url www.coastalcreators.com.
< Message edited by mjmtravel -- 7/28/2008 20:58:07 >
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Server Error - 7/30/2008 12:53:42
If TruckID is the autonumber field for the table, what is the CategoryID? From what you are saying, it sound as though the query should be: fp_sQry="UPDATE Equipment SET Photo = '::Photo::', Category = '::Category::', Make = '::Make::', Model = '::Model::', Capacity = '::Capacity::', SerialNumber = '::SerialNumber::', Description = '::Description::', PurchasePrice = '::PurchasePrice::', OnSalePrice = '::OnSalePrice::' WHERE TruckID = ::TruckID::" However, I am not sure where the Category ID field fits in. If the user can change the records CategoryID, then it too should be included in the query like this: fp_sQry="UPDATE Equipment SET Photo = '::Photo::', CategoryID = ::CategoryID::, Category = '::Category::', Make = '::Make::', Model = '::Model::', Capacity = '::Capacity::', SerialNumber = '::SerialNumber::', Description = '::Description::', PurchasePrice = '::PurchasePrice::', OnSalePrice = '::OnSalePrice::' WHERE TruckID = ::TruckID::" See if that works for you.
_____________________________
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.
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Server Error - 7/30/2008 19:24:28
This is not the same as what you have above: fp_sQry="UPDATE Equipment SET Photo = '::Photo::', Category = '::Category::', Make = '::Make::', Model = '::Model::', Capacity = '::Capacity::', SerialNumber = '::SerialNumber::', Description = '::Description::', PurchasePrice = '::PurchasePrice::', OnSalePrice = '::OnSalePrice::' WHERE TruckID = ::TruckID::" You will see TruckID is moved out of the Update clause and into the Where clause.
_____________________________
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.
|
|
|
|
mjmtravel
Posts: 257 Joined: 7/30/2006 Status: offline
|
RE: Server Error - 7/30/2008 19:35:30
Duane That worked perfectly. Just so I understand for the future, the update clause cannot contain the field you actually want to update, and that field should be in the where clause? Then I can assume that the default on the update page has to be TruckID or the field you are also trying to update is that correct. Someday I'll understand all of this.
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Server Error - 7/30/2008 20:24:23
You understand correctly. Every table generally will have a primary key, which in many cases is an auto-number field. The primary key should remain the same as it is a unique identifier for each record. I am not sure what you mean when you say, "I can assume that the default on the update page". Not sure what you mean by "the default".
_____________________________
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.
|
|
|
|
mjmtravel
Posts: 257 Joined: 7/30/2006 Status: offline
|
RE: Server Error - 7/30/2008 20:28:34
The default setting in the query is what I meant. That should be set to the Where clause field also? fp_sQry="UPDATE Equipment SET Photo = '::Photo::', Category = '::Category::', Make = '::Make::', Model = '::Model::', Capacity = '::Capacity::', SerialNumber = '::SerialNumber::', Description = '::Description::', PurchasePrice = '::PurchasePrice::', OnSalePrice = '::OnSalePrice::' WHERE TruckID = ::TruckID::" fp_sDefault="TruckID" fp_sNoRecords="Your Equipment Has Been Updated, Please wait a moment!"
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Server Error - 7/30/2008 20:38:26
To be honest, the fp_sDefault is of no value in an UPDATE or INSERT query. It can stay as: fp_sDefault=""
_____________________________
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.
|
|
|
|
mjmtravel
Posts: 257 Joined: 7/30/2006 Status: offline
|
RE: Server Error - 7/30/2008 20:40:04
Thanks again Duane for your help and patience!
|
|
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
|
|
|