|
| |
What if I don' t want a default value in the update statement?
View related threads:
(in this forum
| in all forums)
|
Logged in as: Guest
|
|
|
porsche944
Posts: 366 Joined: 3/6/2002 From: Regina Canada Status: offline
|
What if I don' t want a default value in the update sta... - 8/10/2002 17:57:12
I made an update statment for 10 fields. But not all of them are filled in all of the time. When some fields are blank, I don' t want the default value tossed in there like ti is. i f I don' t have a default value, i get an error. What do i do?
|
|
|
|
KeithG
Posts: 92 From: Irving TX Irving, Texas, USA Status: offline
|
RE: What if I don' t want a default value in the update... - 8/10/2002 18:09:34
Sometimes that can be eliminated (in access db) by changing the " allow zero length" field propery (in design view) to " yes" . That way you would not have to send the default value..... Keith
< Message edited by KeithG -- 8/9/2002 6:11:34 PM >
|
|
|
|
porsche944
Posts: 366 Joined: 3/6/2002 From: Regina Canada Status: offline
|
RE: What if I don' t want a default value in the update... - 8/10/2002 18:57:45
Spooky: i am using the DRW (on diet). Keith: I have alreday have it det to allow zero legnth strings. Anything else?
|
|
|
|
KeithG
Posts: 92 From: Irving TX Irving, Texas, USA Status: offline
|
RE: What if I don' t want a default value in the update... - 8/10/2002 19:09:52
You should be able to use a custom query in the DRW (step 2), put your code in there like UPDATE Customers SET ContactFirstName=' ::ContactFirstName::' ,ContactMiddleName=' ::ContactMiddleName::' ,ContactLastName=' ::ContactLastName::' WHERE CustomerID=::CustomerID:: and if someone leaves the middle name blank in the form it should update the record alright. Maybe the field names are mispelled or maybe without using " customer query" in the DRW it causes problems? Just a thought. Keith
|
|
|
|
porsche944
Posts: 366 Joined: 3/6/2002 From: Regina Canada Status: offline
|
RE: What if I don' t want a default value in the update... - 8/13/2002 1:29:15
But i am being asked for default values for those fields. Using the drw at step 3 after the sql is in place. If i don' t set the default values i get an error when i try to update the record..saying one or more default values were empty.
|
|
|
|
KeithG
Posts: 92 From: Irving TX Irving, Texas, USA Status: offline
|
RE: What if I don' t want a default value in the update... - 8/13/2002 9:53:58
Porsche944, I never put default values in that step but if you look at the underlying code produced FP automatically uses the field names used as the default. That said, I suspect that your problem may be in either a misspelled field name in the query, the default value if you are typeing them, or one of them does not match exactly the field name being sent from page 1. In my experience it is almost always a typo on my part. Just a thought. Keith
|
|
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
|
|
|