ASP Gridview Updating Two Tables

Discussion in '.NET' started by aspshadow, Mar 16, 2009.

  1. aspshadow

    aspshadow

    Joined:
    Mar 16, 2009
    Messages:
    1
    Likes Received:
    0
    Hey everyone this is a problem that no one has been able to give me an answer too, any help would be appreciated

    I have an a gridview which is displaying an accessdatasource table called "Test"

    on another page i have a another gridview which is displaying a table called "Scores"

    How can I updated a value on the "Test" table when a user goes into the edit-update mode an tries to update a value for the "Scores"


    So far I have my update command sql string as follows:

    Update [Test], [Scores] Set SET [Test].[Name]=@Name, [Test].[Total] = @Total, [Scores].[Total2] = [Test].[Total] WHERE [Test].[ID]=@ID And [Test].[ID] = [Scores].[ID]">

    This works but the problem is I have to go into edit mode twice and update before [Scores] see's any change, the table [Test] sees a change and gets updated immediately. THANKS!

    I have tried two update statements, but it won't let me,
    I have tried store procedures, but being an acess database it won't let me

    I'm wondering if i can overite the update functions OnRowUpdating, OnRowUpdated somehow to simply do twice the updates, that would solve my problem. I am programming in C#
     
    aspshadow, Mar 16, 2009
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shiv
    Replies:
    0
    Views:
    518
  2. =?Utf-8?B?SnVzdGlu?=

    Updating multiple Tables

    =?Utf-8?B?SnVzdGlu?=, Nov 21, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,931
    Daniel Fisher\(lennybacon\)
    Nov 22, 2004
  3. evandela@bigpond.net.au

    updating multiple tables

    evandela@bigpond.net.au, Mar 21, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    5,391
    S. Justin Gengo
    Mar 21, 2006
  4. H5N1
    Replies:
    0
    Views:
    2,994
  5. MRW

    Updating 2 Tables at once

    MRW, Aug 20, 2006, in forum: ASP .Net
    Replies:
    10
    Views:
    791
  6. GenxLogic
    Replies:
    3
    Views:
    2,013
    andrewmcdonagh
    Dec 6, 2006
  7. news.rcn.com
    Replies:
    2
    Views:
    1,398
    Roedy Green
    Dec 10, 2007
  8. Paolo

    Two dropdownlist and two tables...

    Paolo, Sep 19, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    267
    Paolo
    Sep 19, 2006
Loading...