
VB5 EE, SQL Server 6.5, stored procedures adding a value of 0, not null.
I've written a stored procedure in Microsoft SQL Server 6.5, which I use to
store some values into a table, however I do not store values for all of the
fields in the table (intentionally) when I call this stored procedure to insert
a new record into the table.
One of the fields in this table is called InvoiceNumber and is a smallint (SQL
Server terminology). It has no default value. The InvoiceNumber field is one
of the fields I do NOT specify when performing the INSERT via the stored
procedure. However, we've discovered that this field is getting values of 0
(zero) whenever my stored procedure is called to insert a new record.
Why? I honestly thought that if a new record was inserted into a table, then
any field which is nullable would get a value of Null, why is this field
getting a value of 0???
Rod
--
Rod Falanga | Any opinions expressed, or implied,
UNM's Alb. Metro Central Intake | are mine alone. They do not represent my
842-1730 | employer's opinions or policies.