Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - SQLDBType.date

Reply
 
Old 04-01-2008   #1 (permalink)
rbrowning1958


 
 

SQLDBType.date

Hello,

Trying to compile some code I was given. Vs 2005 patches applied
AFAICT. Help / About reports visual studio versiopn 8.0.50727.867 and
framework version 2.0.50727.

Code references SqlDbType.date and receives compilation error that the
enumeration does not contain a definition for Date. I looked at the
definition and sure enough my enumeration ends with:

// Summary:
// A SQL Server 2005 user-defined type (UDT).
Udt = 29,

Colleague's machine shows the enumeration with 5 additional values
including Date. What's up with this?

Cheers

Ray

My System SpecsSystem Spec
Old 04-01-2008   #2 (permalink)
Jon Skeet [C# MVP]


 
 

Re: SQLDBType.date

rbrowning1958 <RBrowning1958@xxxxxx> wrote:
Quote:

> Trying to compile some code I was given. Vs 2005 patches applied
> AFAICT. Help / About reports visual studio versiopn 8.0.50727.867 and
> framework version 2.0.50727.
>
> Code references SqlDbType.date and receives compilation error that the
> enumeration does not contain a definition for Date. I looked at the
> definition and sure enough my enumeration ends with:
>
> // Summary:
> // A SQL Server 2005 user-defined type (UDT).
> Udt = 29,
>
> Colleague's machine shows the enumeration with 5 additional values
> including Date. What's up with this?
It looks to me like it's part of .NET 2.0 SP1 - try installing that and
rebuilding.

--
Jon Skeet - <skeet@xxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
My System SpecsSystem Spec
Old 04-01-2008   #3 (permalink)
rbrowning1958


 
 

Re: SQLDBType.date

On Apr 1, 10:37*am, Jon Skeet [C# MVP] <sk...@xxxxxx> wrote:
Quote:

> rbrowning1958<RBrowning1...@xxxxxx> wrote:
Quote:

> > Trying to compile some code I was given. Vs 2005 patches applied
> > AFAICT. Help / About reports visual studio versiopn 8.0.50727.867 and
> > framework version 2.0.50727.
>
Quote:

> > Code references SqlDbType.date and receives compilation error that the
> > enumeration does not contain a definition for Date. I looked at the
> > definition and sure enough my enumeration ends with:
>
Quote:

> > * * * * *// Summary:
> > * * * * // * * A SQL Server 2005 user-defined type (UDT).
> > * * * * Udt = 29,
>
Quote:

> > Colleague's machine shows the enumeration with 5 additional values
> > including Date. What's up with this?
>
> It looks to me like it's part of .NET 2.0 SP1 - try installing that and
> rebuilding.
>
> --
> Jon Skeet - <sk...@xxxxxx>http://www.pobox.com/~skeet* Blog:http://www.msmvps.com/jon.skeet
> World class .NET training in the UK:http://iterativetraining.co.uk
Hello,

Thanks for the reply. I've found the issue - SqlDbType.date is only
defined for framework 3.5, which I don't have installed but colleague
does. We're both using VS 2005 but he also has 2008 installed which I
don't.

Cheers

Ray
My System SpecsSystem Spec
Old 04-01-2008   #4 (permalink)
Jon Skeet [C# MVP]


 
 

Re: SQLDBType.date

rbrowning1958 <RBrowning1958@xxxxxx> wrote:
Quote:

> Thanks for the reply. I've found the issue - SqlDbType.date is only
> defined for framework 3.5, which I don't have installed but colleague
> does. We're both using VS 2005 but he also has 2008 installed which I
> don't.
Are you sure it's in 3.5 rather than 2.0SP1? That would surprise me, to
be honest, given the way the assemblies are laid out etc. (Installing
3.5 also installs 2.0SP1.)

--
Jon Skeet - <skeet@xxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
My System SpecsSystem Spec
Old 04-01-2008   #5 (permalink)
Fred


 
 

Re: SQLDBType.date

Dans : news:MPG.225c1daf3e82f687c22@xxxxxx,
Jon Skeet [C# MVP] disait :
Quote:

> rbrowning1958 <RBrowning1958@xxxxxx> wrote:
Quote:

>> Thanks for the reply. I've found the issue - SqlDbType.date is only
>> defined for framework 3.5, which I don't have installed but colleague
>> does. We're both using VS 2005 but he also has 2008 installed which I
>> don't.
>
> Are you sure it's in 3.5 rather than 2.0SP1? That would surprise me,
> to be honest, given the way the assemblies are laid out etc.
> (Installing
> 3.5 also installs 2.0SP1.)
Yes, these values only appear in .NET 3.5 (in MSDN library).
I guess they can be used only with SQL Server 2008 (new date and time
types).

--
Fred
foleide@xxxxxx

My System SpecsSystem Spec
Old 04-01-2008   #6 (permalink)
Jon Skeet [C# MVP]


 
 

Re: SQLDBType.date

Fred <foleide@xxxxxx> wrote:
Quote:
Quote:

> > Are you sure it's in 3.5 rather than 2.0SP1? That would surprise me,
> > to be honest, given the way the assemblies are laid out etc.
> > (Installing
> > 3.5 also installs 2.0SP1.)
>
> Yes, these values only appear in .NET 3.5 (in MSDN library).
> I guess they can be used only with SQL Server 2008 (new date and time
> types).
Can anyone who has .NET 2.0SP1 but not .NET 3.5 installed actually
confirm this? You see, I was under the impression that .NET 3.5 only
*added* assemblies rather than modifying existing ones - whereas
..NET 2.0 SP1 replaces the .NET 2.0 assemblies.

SqlDbType exists in a .NET 2.0 assembly, hence I would expect the
addition to be part of .NET 2.0SP1.

I've got a 2.0-only VM which I'll back up and then install 2.0SP1 on to
check...

--
Jon Skeet - <skeet@xxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
My System SpecsSystem Spec
Old 04-01-2008   #7 (permalink)
Jon Skeet [C# MVP]


 
 

Re: SQLDBType.date

Jon Skeet [C# MVP] <skeet@xxxxxx> wrote:

<snip>
Quote:

> I've got a 2.0-only VM which I'll back up and then install 2.0SP1 on to
> check...
Okay, I've just checked, and indeed SqlDbType.Date *is* available on
..NET 2.0SP1. You don't have to install .NET 3.5.

--
Jon Skeet - <skeet@xxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
My System SpecsSystem Spec
Old 04-01-2008   #8 (permalink)
Fred


 
 

Re: SQLDBType.date

Dans : news:MPG.225c30ca4b8202acc27@xxxxxx,
Jon Skeet [C# MVP] disait :
Quote:

> Fred <foleide@xxxxxx> wrote:
Quote:
Quote:

>>> Are you sure it's in 3.5 rather than 2.0SP1? That would surprise me,
>>> to be honest, given the way the assemblies are laid out etc.
>>> (Installing
>>> 3.5 also installs 2.0SP1.)
>>
>> Yes, these values only appear in .NET 3.5 (in MSDN library).
>> I guess they can be used only with SQL Server 2008 (new date and time
>> types).
>
> Can anyone who has .NET 2.0SP1 but not .NET 3.5 installed actually
> confirm this? You see, I was under the impression that .NET 3.5 only
> *added* assemblies rather than modifying existing ones - whereas
> .NET 2.0 SP1 replaces the .NET 2.0 assemblies.
I would think the same.
Quote:

> SqlDbType exists in a .NET 2.0 assembly, hence I would expect the
> addition to be part of .NET 2.0SP1.
>
> I've got a 2.0-only VM which I'll back up and then install 2.0SP1 on
> to check...
Some informations about my dll (with 3.5 installed)
version 2.0.50727.1433
size 2,89 Mb (3 036 160 bytes)
last modified 24 oct 2007, 02:47:40

And reflector tells me :
'' Module System.Data.dll
Version:77dc95c1-9ba5-423b-90d1-24aef4cf8492
Location:%SystemRoot%\Microsoft.net\Framework\v2.0.50727\System.Data.dll
Size:3036160 Bytes


--
Fred
foleide@xxxxxx

My System SpecsSystem Spec
Old 04-01-2008   #9 (permalink)
rbrowning1958


 
 

Re: SQLDBType.date

On Apr 1, 1:11*pm, Jon Skeet [C# MVP] <sk...@xxxxxx> wrote:
Quote:

> Jon Skeet [C# MVP] <sk...@xxxxxx> wrote:
>
> <snip>
>
Quote:

> > I've got a 2.0-only VM which I'll back up and then install 2.0SP1 on to
> > check...
>
> Okay, I've just checked, and indeed SqlDbType.Date *is* available on
> .NET 2.0SP1. You don't have to install .NET 3.5.
>
> --
> Jon Skeet - <sk...@xxxxxx>http://www.pobox.com/~skeet* Blog:http://www.msmvps.com/jon.skeet
> World class .NET training in the UK:http://iterativetraining.co.uk
John,

I'm eating my words - I think are correct. The MSDN documentation
implies that this is only available in 3.5, but others have this
working with the 2.0 framework. I am going to reapply the 2.0 SP1 and
see what happens.

Thanks

Ray
My System SpecsSystem Spec
Old 04-01-2008   #10 (permalink)
Jon Skeet [C# MVP]


 
 

Re: SQLDBType.date

rbrowning1958 <RBrowning1958@xxxxxx> wrote:
Quote:

> I'm eating my words - I think are correct. The MSDN documentation
> implies that this is only available in 3.5
Whereabouts, out of interest? I looked earlier, but I couldn't see any
such implications - I may just have been looking in the wrong place. If
it *does* say that, we should fire off a correction...
Quote:

> , but others have this
> working with the 2.0 framework. I am going to reapply the 2.0 SP1 and
> see what happens.


--
Jon Skeet - <skeet@xxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Date VB Script
Date Taken and Date Modified Vista music pictures video
Modified Date used as Date Taken in Photo Gallery and Digital Imag Vista music pictures video
Photo date taken vs. file date Vista music pictures video
Blank "Date Taken / Date Modified" field in Vista Vista file management


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46