|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Retrieving field default value
Hi,
I have 3 text fields in an Access db with each some default values. I have an edit page where user's can edit those fields. The problem am having is if for instance I empty the field in the edition page, since am not allowing null or empty in them, when I save of course I receive an error telling me that this field is not allowing empty value. Now what I would like to be able to do is this, when I save I'll check If the request.form("thefield") is empty, if so then instead of saving the empty value I want to return to the default value set in the db. Any ideas how I could acheive this? Thanks |
|
#2
|
|||
|
|||
|
Hey R2D2.
Did you try to put our field on your BD at "Null = TRUE"? or When you load your page save your 3 text fields in hidden fields. When you'll save a field and is NULL take the value from the hidden fields.. Gl |
|
#3
|
|||
|
|||
|
Ok..
The fields data type are allow null , empty string not allowed. Of course I could change the data type... What I really want to do is be able to get the default value for this field. Must be a way? Thanks |
|
#4
|
|||
|
|||
|
Hum.. :-) dont worry about this one anymore.. I'll simply check if the form field is empty, if yes then save the string that is specified in the field default value...
I think am tired... :-) |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Retrieving field default value |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|