 |
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
|
|
|
|
|

February 13th, 2017, 05:50 PM
|
|
Authorized User
|
|
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

February 14th, 2017, 10:48 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

February 14th, 2017, 10:54 AM
|
|
Authorized User
|
|
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It does have a primary key.
|
|

February 14th, 2017, 11:02 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

February 14th, 2017, 11:05 AM
|
|
Authorized User
|
|
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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 "ID", "NAME", "SORTORDER" FROM "GENRE""></asp:SqlDataSource>
|
|

February 14th, 2017, 03:03 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

March 8th, 2017, 05:42 PM
|
|
Authorized User
|
|
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|
|

March 8th, 2017, 05:54 PM
|
|
Authorized User
|
|
Join Date: Feb 2016
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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..
|
|
 |
|