DataGrid save other table
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: DataGrid save other table

  1. #1
    Join Date
    Sep 2013
    Posts
    6

    DataGrid save other table

    Hi,

    datagrid fields
    name, birthday, number, company, product, quantity

    click on the Save button



    customer table
    name, number, birth day must record fields.

    list table
    company, product, quantity must record fields.


    I'm trying VB6, SQL Server

  2. #2
    DataMiser is online now Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,813

    Re: DataGrid save other table

    You'll need to read the data from the grid or the recordset behind the grid then build the proper update statements to update you tables

    i.e. Update CustomerTable Set [Name]='Whatever', Number=0, Birthday='10/31/2013'
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Sep 2013
    Posts
    6

    Re: DataGrid save other table

    I'm sorry I could not understand.
    When I select the first grid, the user's operations are appearing in second field. I want to save the fields which are in grid, to separate statement.

  4. #4
    DataMiser is online now Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,813

    Re: DataGrid save other table

    There is not nearly enough info to give a specific answer. We also do not know what if any coding you understand.
    The basic process is as I described before
    [all of this would be in a loop if you are wanting to do multiple rows]
    Read the data from the grid
    Build an update query to update the first table with the values from the columns you want from the grid
    Build an update query to update the second table with the values from the columns you want from the grid
    [repeat as needed]
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center