Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 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 23rd, 2007, 09:29 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Click to update

Currently im learning to use the application development of VisualStudio 2005

i have created a basic local database with two forms, customer and order, with the obvious fields, CustomerID, Firstname etc in the Customer form. In the Order form i have OrderID(PK), CustomerID, Products, etc etc. I have setup my dataset and i have drag from the dataset to the form. i can input data in the form when running and it carrys the primary key through from Customer table to Order table and works fine. yet when i use the save button from the navigation bar that was automatically added to the form it does not save this data once i input test values.

Ive tried multiple tutorial videos from Microsoft C# express and VS help and i have even gone as far as using Visual Stuidos inbuilt 'howto' online help...which is useless to me

From this i would like to add two buttons which when clicked will save(update) and delete data to BOTH the tables.

Help with what code i need to put behind these two buttons would be much appreiciated.

Thanks

Cass

If any other information about my setup is needed just ask.

 
Old May 23rd, 2007, 09:35 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Had you considered creating a stored procedure that will accept input parameters to Update and Delete data from both tables?? This seems to be the most obvious route.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old May 23rd, 2007, 11:21 PM
Authorized User
 
Join Date: May 2006
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to notrosh
Default

you could also just use an SQL statement that was hard coded into the code if you are not familiar with stored procedures.





Similar Threads
Thread Thread Starter Forum Replies Last Post
update multiple columns in an update statement debbiecoates SQL Server 2000 1 August 17th, 2008 04:01 AM
Extra conditional update click event in FormView nuttylife2 ASP.NET 2.0 Professional 1 July 31st, 2006 08:00 PM
Right-Click or Double-Click Combobox? panuvin C# 2005 3 June 15th, 2006 04:30 PM
Datagrid.update() and DataAdapter.Update aarunlal ASP.NET 2.0 Professional 2 February 23rd, 2006 11:41 PM





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