ASP Gridview Updating Two Tables

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

  1. aspshadow

    aspshadow

    Joined:
    Mar 16, 2009
    Messages:
    1
    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. Advertising

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:
    410
  2. =?Utf-8?B?SnVzdGlu?=

    Updating multiple Tables

    =?Utf-8?B?SnVzdGlu?=, Nov 21, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,726
    Daniel Fisher\(lennybacon\)
    Nov 22, 2004
  3. H5N1
    Replies:
    0
    Views:
    2,723
  4. news.rcn.com
    Replies:
    2
    Views:
    1,127
    Roedy Green
    Dec 10, 2007
  5. Paolo

    Two dropdownlist and two tables...

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

Share This Page