Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Into

Status
Not open for further replies.

tlmm

Programmer
Mar 25, 2004
45
CA
I created an ASP page and I am trying to insert a record into an Microsoft Access (2003) database. If I don't put a date or a number in a textbox and try to insert it into the database, where these fields are represented by a number or date datatype in the database, the insert statement errors out. If I do put a date or a number in these textboxes the insert statement works fine.

Is there way to represent a null date in an Access database?

Is there way to represent a null number in an Access database?

Thanks.
 
what error are you getting?

If it is along the lines of "myField does not accept null values" then you need to change that setting within the database table itself in the Design view.


Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Is there way to represent a null date in an Access database?

Is there way to represent a null number in an Access database?


for both :

insert into table(numberfield, textfield) values(null,null)

if allow zero length or required or disallow null is set on the fields you will need to change the data constraints on the db in order to fascilitate what you're trying to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top