472,951 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,951 software developers and data experts.

Upadate Database from datgrid in 3-tier archi


I am retrieveing the data from 2 table (MAster Detail) to the winform
and displaying on winform in a grid view.User should have an uption to
update the rows.So There is a button Update wen ever a person clicks
that DataSource needs to be updated.What i did is in Winforms for
displaying the data i have a dataset.So wenever user clicks the update
button here is what i am doing:

BindingContext[dsAdmin, "MasterMovie"].EndCurrentEdit();
BindingContext[dsAdmin, "Show"].EndCurrentEdit();
Adminshow as1 = new Adminshow();
dsAdmin2 = as1.updateData(dsAdmin);

I am passing the whole dataset to dataaccess layer.
In Data Access Layer:
public DataSet UpdateData(DataSet ds2)
SqlCommand cmd1 = new SqlCommand("INSERT INTO [Show]
([TheatreID], [MovieID], [Date], [NumberOfShows], [ShowTimes])" +
" VALUES (@TheatreID, @MovieID, @Date,
@NumberOfShows, @ShowTimes)", conn);

dashow1 = new SqlDataAdapter(cmd1);
SqlCommandBuilder cmb = new SqlCommandBuilder(dashow1);
DataSet ds7 = new DataSet();

dashow1.Update(ds7, "Show");

return ds7;
In BusinessLogic Layer i am just capturing this and passing it to
But wen i close the WinForm and relod the table data again..Its still
showing the old Data not the updated one?I am not getting any error

Please let me know how to go about this...
Jun 27 '08 #1
0 962

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: lkrubner | last post by:
I have a webserver through Rackspace. I create a domain. I create an FTP user. I upload some files. I create a database called testOfSetupScript and then I create a database user named setup. I...
by: Cherrish Vaidiyan | last post by:
hello, Thanx for the suggestions on my Listener query. Now i am performing a simple work.. STANDBY DATABASE creation. I have followed the instraction from Oracle 9i Release 1 documentation...
by: Cherrish Vaidiyan | last post by:
sir, The following are the steps that i followed in setting up standby database on Red hat Linux 9. i am using Oracle 9i. i have followed the steps in this site : ...
by: Marvin Libson | last post by:
Hi All: I am running DB2 UDB V7.2 with FP11. Platform is Windows 2000. I have created a java UDF and trigger. When I update my database I get the following error: SQL1224N A database...
by: xixi | last post by:
hi, we use db2 udb v8.1 on windows, i am trying to use federated database objects to create wrapper, even though i have update dbm cfg using federated yes, i still get error "the instance for the...
by: Kamlesh | last post by:
Hi, How do I know the physical database path of a database. When I goto the DB2INSTANCE users's directory (/home/db2inst1), I see following folders: /db2inst1/NODE0000/SQL00001...
by: pintur | last post by:
The message is: SQL1036C Errore di I/O durante l' accesso al database. SQLSTATE=58030 what is the proble? what for restore tables? thanks
by: PC Datasheet | last post by:
Looking for suggestions ---- A database was designed for a national automobile inspection program. In it's simplest form, the database has two tables: TblOwner OwnerID <Year/Make/Model owned...
by: geshan | last post by:
hello everyone, if you can help me to update a table entry from global.asa on session end please help me..
by: 1980dinesh | last post by:
Hi, I have a DatGrid and i have added a checkboxes as template column i have write javascipt code to check and unckeck but at button event of code behind i can't grab the (checked) true condition...
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.