Add Method

pruebens

Well-known member
Joined
Nov 21, 2002
Messages
71
Okay here is my situation (not sure if this is a VB problem or SQL)

Anyway I have a form that I use to connect and update records on a SQL 2000 database.

I have set certain columns in the table to have a default value of FALSE.

If I use my SQL console I can add records and the default values get put int eh columns like I want.

However if I try to add a record through my app, the default values get set to NULL and not to FALSE like I want them to. The record gets added and even adds the information except for those default values being set to NULL.

Anyone have any ideas? TIA.
 
Are you trying to add NULL objects? It would help if you could paste the code where you think the problem is occuring so we can take a look.
 
No Im not trying to post a NULL and unfortuantely due to security issues I cant post the code. I know it makes it harder.
 
Hm.. :( Well passing a NULL object is the only reason I can think of as to why its giving you the value of NULL instead of the default FALSE.

Perhaps someone with more experience in the database area of .NET can offer some help.
 
due to security issues I cant post the code
Youve got to be kidding me. Just change the names of your objects, table names and fields and post the code. You dont honestly think we could solve this without it, did you? Were not asking for your entire solution, just 3 or 4 lines of it.
 
I understand that and I was only looking for an idea but no I cant post the code because changing the lines would negate what I need to do. Hard to explain but if you saw what I had in here the reason why I cant post would make total sense. Thanks Ill find the answer.
 
Back
Top