Insert blank record into number field

danb

Registered User.
Local time
Today, 16:50
Joined
Sep 13, 2003
Messages
98
Hi,

I have an SQL insert statement which inserts AgeMin and AgeMax into two different database columns. I'd like this to allow blank entries, but it doesn't seem to work - even though I have the database set up to allow blank values??

Any ideas?

Thanks.
 
Have you looked at the Nz function? This allows you to state what you need entered if the value is null. This may be what you need (although someone else may come up with a better solution)!
 
Thanks, I've not even heard of that - let alone konw how to use it!

I actually sorted the problem out now by building my SQL command string from a series of vbscript conditionals. That way, if the incoming value of AgeMin has defaulted to zero, I just leave the UPDATE AgeMin out of the SQL command - and the database entry for AgeMin is left blank.

i.e. I avoid having to write anything to the database if I want it to be blank, rather than alway inputting a value which sometimes needs to be blank.

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom