Hello
I have a problem with default values in my sqlserver database. I have a table Customers with the field 'mailing' (data type 'bit'). This field has a default value 1.
In my vb-program I have a procedure to add a customer with the ado method '.addNew'. When I add a record to this table, the field 'mailing' has value 'NULL'.
Here is my code
objRec2.AddNew
objRec2!CustomerNr = Customer
objRec2!Name = txtName.text
objRec2!Adress = txtadress.Text
objRec2!tel = txttelephone.Text
objRec2!Email = txtemail.Text
objRec2.Update
objRec2.Close
note that the field 'mailing' is not included in the addNew statement...
does anyone know what could be the problem?
tnx in advance
Mim+
I have a problem with default values in my sqlserver database. I have a table Customers with the field 'mailing' (data type 'bit'). This field has a default value 1.
In my vb-program I have a procedure to add a customer with the ado method '.addNew'. When I add a record to this table, the field 'mailing' has value 'NULL'.
Here is my code
objRec2.AddNew
objRec2!CustomerNr = Customer
objRec2!Name = txtName.text
objRec2!Adress = txtadress.Text
objRec2!tel = txttelephone.Text
objRec2!Email = txtemail.Text
objRec2.Update
objRec2.Close
note that the field 'mailing' is not included in the addNew statement...
does anyone know what could be the problem?
tnx in advance
Mim+