![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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? 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 Specs![]() |
| | #3 (permalink) |
| | 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 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 Specs![]() |
| | #4 (permalink) |
| | 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. 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 Specs![]() |
| | #5 (permalink) |
| | 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.) I guess they can be used only with SQL Server 2008 (new date and time types). -- Fred foleide@xxxxxx |
My System Specs![]() |
| | #6 (permalink) |
| | 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). 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 Specs![]() |
| | #7 (permalink) |
| | 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... ..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 Specs![]() |
| | #8 (permalink) |
| | 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. 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... 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 Specs![]() |
| | #9 (permalink) |
| | 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 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 Specs![]() |
| | #10 (permalink) |
| | 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 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 Specs![]() |
![]() |
| 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 | |||