Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5.1 > BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 13th, 2017, 04:50 PM
N_B N_B is offline
Authorized User
Points: 86, Level: 1
Points: 86, Level: 1 Points: 86, Level: 1 Points: 86, Level: 1
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Feb 2016
Posts: 21
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
Reply With Quote
  #2 (permalink)  
Old February 14th, 2017, 09:48 AM
Imar's Avatar
Wrox Author
Points: 70,820, Level: 100
Points: 70,820, Level: 100 Points: 70,820, Level: 100 Points: 70,820, Level: 100
Activity: 80%
Activity: 80% Activity: 80% Activity: 80%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,894
Thanks: 79
Thanked 1,545 Times in 1,522 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!
Reply With Quote
  #3 (permalink)  
Old February 14th, 2017, 09:54 AM
N_B N_B is offline
Authorized User
Points: 86, Level: 1
Points: 86, Level: 1 Points: 86, Level: 1 Points: 86, Level: 1
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Feb 2016
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It does have a primary key.
Reply With Quote
  #4 (permalink)  
Old February 14th, 2017, 10:02 AM
Imar's Avatar
Wrox Author
Points: 70,820, Level: 100
Points: 70,820, Level: 100 Points: 70,820, Level: 100 Points: 70,820, Level: 100
Activity: 80%
Activity: 80% Activity: 80% Activity: 80%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,894
Thanks: 79
Thanked 1,545 Times in 1,522 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!
Reply With Quote
  #5 (permalink)  
Old February 14th, 2017, 10:05 AM
N_B N_B is offline
Authorized User
Points: 86, Level: 1
Points: 86, Level: 1 Points: 86, Level: 1 Points: 86, Level: 1
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Feb 2016
Posts: 21
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>
Reply With Quote
  #6 (permalink)  
Old February 14th, 2017, 02:03 PM
Imar's Avatar
Wrox Author
Points: 70,820, Level: 100
Points: 70,820, Level: 100 Points: 70,820, Level: 100 Points: 70,820, Level: 100
Activity: 80%
Activity: 80% Activity: 80% Activity: 80%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,894
Thanks: 79
Thanked 1,545 Times in 1,522 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!
Reply With Quote
  #7 (permalink)  
Old February 14th, 2017, 02:35 PM
N_B N_B is offline
Authorized User
Points: 86, Level: 1
Points: 86, Level: 1 Points: 86, Level: 1 Points: 86, Level: 1
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Feb 2016
Posts: 21
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?
Reply With Quote
  #8 (permalink)  
Old March 8th, 2017, 04:42 PM
N_B N_B is offline
Authorized User
Points: 86, Level: 1
Points: 86, Level: 1 Points: 86, Level: 1 Points: 86, Level: 1
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Feb 2016
Posts: 21
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?
Reply With Quote
  #9 (permalink)  
Old March 8th, 2017, 04:54 PM
N_B N_B is offline
Authorized User
Points: 86, Level: 1
Points: 86, Level: 1 Points: 86, Level: 1 Points: 86, Level: 1
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Feb 2016
Posts: 21
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 04:57 PM.
Reply With Quote
  #10 (permalink)  
Old March 9th, 2017, 09:08 AM
Imar's Avatar
Wrox Author
Points: 70,820, Level: 100
Points: 70,820, Level: 100 Points: 70,820, Level: 100 Points: 70,820, Level: 100
Activity: 80%
Activity: 80% Activity: 80% Activity: 80%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,894
Thanks: 79
Thanked 1,545 Times in 1,522 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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 07:15 AM
GridView Column Editing snufse ASP.NET 2.0 Basics 4 December 15th, 2008 07: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



All times are GMT -4. The time now is 06:07 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.