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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Null to command object from ASP

Status
Not open for further replies.

Syerston

Programmer
Jun 2, 2001
142
GB
I appear to be having a problem passing zero values into my command object to run a stored procedure in MS Access. If the field in Access is to contain text, I check beforehand and assign null if there is no user input in that field on the ASP, the stored procedure runs fine.

However, this logic does not seem to work with numeric fields and date fields on the database.

Would anyone have any ideas.
 
How are you using the command object to insert? Can you show your code? Are you really running stored procedures in MS Access? I thought that access had no ability to create SPs.

Your problem could be in your INSERT statement...

INSERT INTO myTable (textField) VALUES ('') <-- VALID Statement

INSERT INTO myTable (numericFIeld) VALUES () <-- INVALID Statement

INSERT INTO myTable (dateField) VALUES (##) <-- INVALID Statement

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top