Wrox Programmer Forums
|
BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 by Thearon Willis, Bryan Newsome; ISBN: 9780764574016
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 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 May 28th, 2007, 03:44 PM
Registered User
 
Join Date: May 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to luisxvarg Send a message via MSN to luisxvarg
Default Error code: Chapter 17 Pag 576

if you test datagridview Project and try to update datarow throw exception

You read this code:

<asp:SqlDataSource ID=”sdsAuthors” Runat=”server”
ProviderName = "System.Data.SqlClient"
ConnectionString = "Server=bnewsome; User ID=sa;
Password=!p@ssw0rd!;Database=pubs; "
SelectCommand = "SELECT au_id, au_lname, au_fname, phone,
address, city, state, zip FROM authors"
UpdateCommand = "UPDATE authors SET au_lname = @au_lname,
au_fname = @au_fname, phone = @phone, address = @address,
city = @city, state = @state, zip = @zip
WHERE au_id = @original_au_id" >

 <UpdateParameters>
         <asp:Parameter Type="String" Name="au_lname"></asp:Parameter>
         <asp:Parameter Type="String" Name="au_fname"></asp:Parameter>
         <asp:Parameter Type="String" Name="phone"></asp:Parameter>
         <asp:Parameter Type="String" Name="address"></asp:Parameter>
         <asp:Parameter Type="String" Name="city"></asp:Parameter>
         <asp:Parameter Type="String" Name="state"></asp:Parameter>
         <asp:Parameter Type="String" Name="zip"></asp:Parameter>
         <asp:Parameter Type="String" Name="au_id"></asp:Parameter>
      </UpdateParameters>

and no works, so to fix it change the line

WHERE au_id = @original_au_id" >

with the line

WHERE au_id = @au_id" >

and now it works






Civil Engineer, VB developer
 
Old October 15th, 2007, 08:06 PM
Registered User
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

DON'T DO THAT. If you do what you suggested, all the values in the DB will be modified. Your problem is not solved yet.

Can anyone else make a suggestion??






Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while running javascript code in ASP.NET Pag fozia_izhar ASP.NET 1.0 and 1.1 Professional 2 December 20th, 2006 03:39 AM
parse error $end pag 118 table3.php vkranendonk BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 February 2nd, 2006 12:05 PM
Rest of code for Chapter 17 Glen Conaway BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 2 August 31st, 2004 06:47 PM





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