Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 6th, 2009, 02:09 PM
Authorized User
 
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default SQL Error, p. 412, step 11

Imar,

When I click "Insert" the browser returns this error:
The version of SQL Server in use does not support datatype 'date'.

The database definition for "UpdateDateTime" is "datetime". I tried entering only a date (04/06/2009 or 2009/04/06) and a date and a time (04/06/2009 14:02:00) but I still get the same error.

This machine at work has the full blown SQL Server Management Studio, i.e., not the Express version. I would not expect that that would be causing this error.

I deleted "AddEditReview.aspx" and did it over with the same results. I may have made the same mistake twice, but, if so, I cannot see it.

Thomas
 
Old April 6th, 2009, 02:21 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

What version of SQL Server are you using? And what's the datatype of the reflected types in the parameters?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 6th, 2009, 02:41 PM
Authorized User
 
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default

I am using SQL Server 2005.

From "AddEditReview.aspx"

Code:
        <InsertParameters>
            <asp:Parameter Name="Title" Type="String" />
            <asp:Parameter Name="Summary" Type="String" />
            <asp:Parameter Name="Body" Type="String" />
            <asp:Parameter Name="GenreId" Type="Int32" />
            <asp:Parameter Name="Authorized" Type="Boolean" />
            <asp:Parameter DbType="Date" Name="UpdateDateTime" />
        </InsertParameters>
OK, found it. I changed the "DbType" to "DateTime" and it worked. It was also in the "UpdateParameters".

It this something I should have known about or resulting from some setting that I should have made?

Thomas
 
Old April 6th, 2009, 03:11 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It used to work fine, before SQL Server 2008 came out. Once it was released, .NET / VWD was patched to support the new Date format, and it looks like it's inferring an incorrect type now. I have seen this before a couple of times.....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
need a step by step book angelica ASP.NET 3.5 Basics 5 October 31st, 2008 05:06 AM
Ch 8 pg 282 Step 11 workib BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 May 26th, 2008 04:19 PM
How detailed are the step-by-step littleccguy BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 May 18th, 2006 03:45 PM
We Based Database Step By step desireemm SQL Language 1 October 15th, 2005 08:15 PM
Step by step installation peter_budo Beginning PHP 0 August 31st, 2004 12:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.