|
| |
|
|
mjmtravel
Posts: 327 Joined: 7/30/2006 Status: offline
|
Missing Default Values - 3/17/2009 19:34:17
I hate to beat a dead horse, but I cannot find what I'm missing here. I've read the above and everything else on the forum with no luck. I have a 3 page database update form, I have page 1&2 working great but when I submit I get this error. Database Results Error Description: Syntax error in UPDATE statement. Number: -2147217900 (0x80040E14) 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. I'm using FP 2003 and have the run the spooky diet on all 3 pages and I'm using the old fp_class files. I have every field in the database set with a default of 0, Required is set to NO and Allow zero length is set to YES on all fields. I also have the fields all set to text. The pages its running on is also on the spooky log in. I already have similiar forms on the same site working great. This was a addition. Here is my update statement, any ideas would be great. fp_sQry="UPDATE CustomerTrips SET TripTitle = '::TripTitle::', Date = '::Date::', FlightDepart = '::FlightDepart::', FlightReturn = '::FlightReturn::', MyComments = '::MyComments::', AirMiles = '::Airmiles::' WHERE (UserName = '" & session("UserName") & "')" fp_sDefault="UserName" fp_sNoRecords="Your Personal Travel Log Has Been Updated" fp_sDataConn="Database2" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=0 fp_fTableFormat=False fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_sColTypes="&CustomerID=3&UserID=3&UserName=202&TripTitle=202&Date=202&FlightDepart=202&FlightReturn=202&MyComments=202&AirMiles=202&" fp_iDisplayCols=6 fp_fCustomQuery=False BOTID=0 fp_iRegion=BOTID %>
|
|
|
|
pd_it_guy
Posts: 215 Joined: 3/4/2008 Status: offline
|
RE: Missing Default Values - 3/17/2009 20:19:25
I am assuming all the values are being POSTed over from another page. Every time I have seen that error it's actually correct- so for starters, do a write-out (response.write of the variable pulled with a request.form) of all the variables BEFORE they get to the SQL statement that does the DB write. If the SQL going into error clobbers the whole page, temporarily comment it out or cut it out and drop it on a blank page. That way, you can submit the form, and you can see very quickly what values are coming over- in case you made typo in a variable or form page. If all variables are accounted for, if the SQL is laid out as we see it, there is a line continuation issue. Normally lines end in " _ and restart in & " That won't get the missing variable though. Third possibility- in how you are handling dates. I think what you have takes a string and writes it as a string and you are not doing any comparisons. Dates usually come in bounded by pound signs. But I've done them both ways, and that too would not cause the error. See if any of this helps
|
|
|
|
mjmtravel
Posts: 327 Joined: 7/30/2006 Status: offline
|
RE: Missing Default Values - 3/17/2009 20:24:32
Not sure what you are talking about in that first part. Even if I put everything in all the fields I still get the error also.
|
|
|
|
mjmtravel
Posts: 327 Joined: 7/30/2006 Status: offline
|
RE: Missing Default Values - 3/23/2009 17:50:20
It was staring right at me when I looked at the post I put in. Date!!!!! Duh Thanks for the help.
|
|
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
|
|
|