PC Review


Reply
Thread Tools Rate Thread

Database Data Types

 
 
Jonathan Wood
Guest
Posts: n/a
 
      26th Aug 2007
The further I delve into .NET and ADO.NET, the more things I seem to find
missing that we had 10 or 15 years ago. I really don't understand why.

So, using VS to create an SQL database I see:

1. There is no Boolean data type. Further, if I use tinyint and set it's
default value to 0, I see that it defaults to NULL, which causes an error if
I don't set it before I try to save a new record.

2. There is a money type, but it appears that is just an alias for decimal
or something. Once data is entered, it is automatically formatted something
like "39.9500".

Can anyone tell me how they are dealing with these limitations?

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

 
Reply With Quote
 
 
 
 
Miha Markic
Guest
Posts: n/a
 
      26th Aug 2007
Hi Jonathan,

"Jonathan Wood" <(E-Mail Removed)> wrote in message
news:%23hgDA2%(E-Mail Removed)...
> The further I delve into .NET and ADO.NET, the more things I seem to find
> missing that we had 10 or 15 years ago. I really don't understand why.
>
> So, using VS to create an SQL database I see:


What exactly are you doing?
>
> 1. There is no Boolean data type. Further, if I use tinyint and set it's
> default value to 0, I see that it defaults to NULL, which causes an error
> if I don't set it before I try to save a new record.
>
> 2. There is a money type, but it appears that is just an alias for decimal
> or something. Once data is entered, it is automatically formatted
> something like "39.9500".


Data formatting is in the UI domain, not database domain. There are several
ways of formatting, depending on the UI controls you are using.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

> Can anyone tell me how they are dealing with these limitations?
>
> Thanks.
>
> --
> Jonathan Wood
> SoftCircuits Programming
> http://www.softcircuits.com
>


 
Reply With Quote
 
Jonathan Wood
Guest
Posts: n/a
 
      26th Aug 2007
Miha,

>> So, using VS to create an SQL database I see:

>
> What exactly are you doing?


Creating a table. That's the only place I'm aware of where data types are
specified.

> Data formatting is in the UI domain, not database domain. There are
> several ways of formatting, depending on the UI controls you are using.


The table designer provides a default value property, yet it seems to be
ignored. I don't see that as being in the UI domain.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

 
Reply With Quote
 
Miha Markic
Guest
Posts: n/a
 
      27th Aug 2007

"Jonathan Wood" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Miha,
>
>>> So, using VS to create an SQL database I see:

>>
>> What exactly are you doing?

>
> Creating a table. That's the only place I'm aware of where data types are
> specified.


But how are you creating a table? Using server explorer? Then there are
types bit (boolean) and numeric(n,m).
Or are you reffering to DataTable?

>
>> Data formatting is in the UI domain, not database domain. There are
>> several ways of formatting, depending on the UI controls you are using.

>
> The table designer provides a default value property, yet it seems to be
> ignored. I don't see that as being in the UI domain.


Value formating is alyways in UI domain. Why should data tier deal with
formatting?
Anyway, try with numeric(n,m) datataype.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

 
Reply With Quote
 
Jonathan Wood
Guest
Posts: n/a
 
      27th Aug 2007
Miha,

>> Creating a table. That's the only place I'm aware of where data types are
>> specified.

>
> But how are you creating a table? Using server explorer? Then there are
> types bit (boolean) and numeric(n,m).
> Or are you reffering to DataTable?


As I indicated, in Visual Studio 2005. Whatever you want to call that table
designer.

>>> Data formatting is in the UI domain, not database domain. There are
>>> several ways of formatting, depending on the UI controls you are using.

>>
>> The table designer provides a default value property, yet it seems to be
>> ignored. I don't see that as being in the UI domain.

>
> Value formating is alyways in UI domain. Why should data tier deal with
> formatting?


Again, I do not consider a default value to be related to formatting or the
UI domain.

> Anyway, try with numeric(n,m) datataype.


I'll look into it.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
database design - different possible data types Daniel Microsoft Access 5 21st Sep 2006 02:46 PM
Retrieving data types from database =?Utf-8?B?QmFhbDgw?= Microsoft C# .NET 1 26th Jun 2006 03:50 PM
Access database Memo data types Sanjib Biswas Microsoft ADO .NET 2 5th Nov 2005 01:49 PM
multiple data types in normalized database =?Utf-8?B?TEFG?= Microsoft Access Database Table Design 10 16th Feb 2005 02:12 PM
How do I define Database and Relation data types? =?Utf-8?B?Ui4gSm9obnNvbg==?= Microsoft Access VBA Modules 1 31st Jan 2005 06:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:36 AM.