Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Allow Nulls or Don;t Allow Nulls
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00710740
Message ID:
00710743
Vues:
12
>Hi,
>
>New to SQL and VB.NET
>
>I read in an article that suggested don't allow nulls in fields when designing a Database.
>
>Property Table
> FileNum - PK - Auto Increment
> PropertyAddress
> ClientNum _ IX
> More fields
>
>Client Table
> ClientNum - PK - Auto Increment
> ClientName
> ClientAddress
> ClientPhone
> More fields
>
>I did not allow nulls and I'am now having problems with using the DataFormWizard in VB.net using the two tables.
>
>The problem is that the wizard works until I try to add a new row, it gives a message that the FileNum PK field does not allow nulls and will not let me add a new record. For all fields it seems to not allow non null fields.
>
>My question is: What's the best way to Design the tables; use nulls in fields or not use nulls and why?
>
>Also, if you use '' as a default value for a varchar field is that a null or just nothing?
>
>
>Thanks!!!!!!
>Roland

Hi,
Your current problem with wizard is that the wizard tries to save your newly added record before you had filled forms fields. This is not related to your database vision – the wizard works that way and if you want to use it you are forced to make you fields as it requires ;)
And using '' as a default value will put an empty string into the field (not null value)
Venelina Jordanova

Outsourcing IT Services Ltd.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform