Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 June 19th, 2007, 05:43 PM
Authorized User
 
Join Date: Apr 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 8 inserts 2 records...

...instead of 1. Where should I look for this problem?

thanks.
 
Old June 20th, 2007, 02:13 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 there,

Are you using VB? If so, check if you have duplicate handlers. You can have an OnClick in the HTML registered for something like Button1_Click and at the same time have a method like:

Button1_Click (...) Handlers Button1.Click

If that's the case, the event handler is called twice, resulting in duplicate records.

If that doesn't help, can you post you code?

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old June 20th, 2007, 04:28 PM
Authorized User
 
Join Date: Apr 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's the code. I just noticed that for each .cs file there is a corresponding VB file. I didn't notice them before and I think I would have.

Well I would post the code if I saw some way to attach it or do I have to paste it in the message?
 
Old June 21st, 2007, 01:09 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yeah, you can just paste it in the message. You can use the Code button on the toolbar (#) to format it as code. Be sure to add a line breaks here and there to avoid very wide pages that are hard to read....

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old May 26th, 2009, 06:56 PM
Authorized User
 
Join Date: Nov 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Posting Two records

I am having the same issue with the insert posting two records to the table. I am using VB and have looked for any code refering to a button click call and have found none. All the code is generated by Visual Studio 2005. Is there something else to look for and where should I search.
Thanks.
Neal
 
Old May 27th, 2009, 06:32 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you post the relevant code? Difficult to say something useful without it....

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
inserts fbailey Classic ASP Databases 3 February 22nd, 2007 02:39 PM
stored procedure that inserts data desireemm SQL Language 5 January 22nd, 2006 04:25 PM
Multiple Inserts ~Bean~ SQL Language 1 January 20th, 2006 03:00 PM
no inserts for you sadermine VB.NET 1 September 5th, 2005 10:05 PM
Script with inserts zee_ahmed2002 SQL Server 2000 2 October 19th, 2004 04:45 AM





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