Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 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 February 13th, 2017, 05:50 PM
N_B N_B is offline
Authorized User
 
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default GridView Enable Editing and Deleting Missing

On page 444, #8 after dragging the Genre table into the cpMainContent area, when the Smart Tasks panel comes up, it does not show check boxes for "Enable Editing" and "Enable Deleting".

IMPORTANT: I'm using Oracle here and not SQL Server. And the user I connect to the database with has SELECT/INSERT/UPDATE/DELETE privileges on the table.

What could be the reason why the options for Edit and Delete do not show up?

Thanks,
Neil
 
Old February 14th, 2017, 10:48 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Neil,

Maybe your table doesn't have a primary key?

I don't use Oracle so I am not sure to what extend this scenario is supported or what it takes to make it work.

Cheers,

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 February 14th, 2017, 10:54 AM
N_B N_B is offline
Authorized User
 
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It does have a primary key.
 
Old February 14th, 2017, 11:02 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

What SQL does it create for you?

Like I said, not using Oracle, so I can't help you much further than asking some obvious questions ;-)

Cheers,

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 February 14th, 2017, 11:05 AM
N_B N_B is offline
Authorized User
 
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The SqlDataSource looks like this after I drag the table:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:FG01 %>" ProviderName="<%$ ConnectionStrings:FG01.ProviderName %>" SelectCommand="SELECT &quot;ID&quot;, &quot;NAME&quot;, &quot;SORTORDER&quot; FROM &quot;GENRE&quot;"></asp:SqlDataSource>
 
Old February 14th, 2017, 03:03 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yeah, that's what I expected. The missing edit and delete statements indicate that the source doesn't support it, which could mean the lack of keys, support for it in Oracle, or something else.

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 February 14th, 2017, 03:35 PM
N_B N_B is offline
Authorized User
 
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

So I would have to manually set the UpdateCommand, DeleteCommand, and InsertCommand properties myself? As well as the UpdateParameters, DeleteParameters, and InsertParameters as shown on page 446? Bummer.

Anyone here use Oracle and know how to resolve this without doing it manually?
 
Old March 8th, 2017, 05:42 PM
N_B N_B is offline
Authorized User
 
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

So I'm in Chapter 13 where it deals with a lot of the VS dialog boxes for database access and query building and column formatting. But it just plain does not work with Oracle? This can't be, can it?? I know Microsoft wants everyone to use their database, but they can't be so stupid as to not allow this to work with Oracle, right? I mean Oracle is a HUGELY popular enterprise database.

Someone here HAS to be using Oracle, no??? Am I missing something?
 
Old March 8th, 2017, 05:54 PM
N_B N_B is offline
Authorized User
 
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ON page 461, VS produces this for me:

SELECT [ID], [TITLE], [AUTHORIZED], [CREATEDATETIME] FROM [REVIEW] WHERE ([GENREID] = ?)

This does not work in Oracle. It should be:

SELECT ID, TITLE, AUTHORIZED, CREATEDATETIME FROM REVIEW WHERE (GENREID = :GENREID)

And it won't produce the <asp:ControlParameter> code. I guess that's the reason for the question mark?

Last edited by N_B; March 8th, 2017 at 05:57 PM..
 
Old March 9th, 2017, 10:08 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You may need to install the ODT: Oracle Developer Tools: http://www.oracle.com/technetwork/de...iew/index.html

With those installed, it seems you can do stuff like this: http://www.oracle.com/webfolder/tech...SPNetApps.html which is pretty much what my book is doing.

Cheers,

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
Axax enable custom control - GridView santosh kumar singh ASP.NET 4 General Discussion 0 January 20th, 2011 08:15 AM
GridView Column Editing snufse ASP.NET 2.0 Basics 4 December 15th, 2008 08:59 AM
How to enable deleting in DetailsView? firblazer ASP.NET 3.5 Basics 1 June 18th, 2008 10:51 AM
Enable Editing on Gridview - RESOLVED Andrew.Berry ASP.NET 2.0 Basics 0 October 3rd, 2007 05:29 AM





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