Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / August 2007

Tip: Looking for answers? Try searching our database.

Database Data Types

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonathan Wood - 26 Aug 2007 15:29 GMT
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.

Signature

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

Miha Markic - 26 Aug 2007 15:57 GMT
Hi Jonathan,

> 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
[quoted text clipped - 3 lines]
> 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.

Signature

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 - 26 Aug 2007 19:52 GMT
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.

Signature

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

Miha Markic - 27 Aug 2007 09:49 GMT
> Miha,
>
[quoted text clipped - 4 lines]
> 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.

Signature

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/

Jonathan Wood - 27 Aug 2007 16:22 GMT
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.
[quoted text clipped - 4 lines]
> 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.

Signature

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.