Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted
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.
Gamer extraordinaire. Programmer wannabe.
Posted

Hm.. :( Well passing a NULL object is the only reason I can think of as to why it's 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.

Gamer extraordinaire. Programmer wannabe.
  • *Gurus*
Posted
due to security issues I can't post the code
You've got to be kidding me. Just change the names of your objects, table names and fields and post the code. You don't honestly think we could solve this without it, did you? We're not asking for your entire solution, just 3 or 4 lines of it.
Posted
I understand that and I was only looking for an idea but no I can't 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 can't post would make total sense. Thanks I'll find the answer.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...