Results 1 to 3 of 3

Thread: calling helpful programmers! i need your help please!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2004
    Location
    Philippines
    Posts
    125

    Red face calling helpful programmers! i need your help please!

    well, i have posted about saving a form with master/detail relationship...unfortunately nobody responded and now I just want to ask how can i save the details of an unbound datagrid to a database table? please I need your answers on this...I'm counting on you guys! thanks a lot!

  2. #2
    Junior Member
    Join Date
    Jun 2004
    Posts
    29

    Use collections

    You can do that by making a pseudo table at your end and then in turn update the changes in the grid. By pseudo table I mean define a whole table at your end.
    In case you do not want to use it .You can try various collections provided by .net.
    Store that data of unbound grid in the Data table made by you and then save it in the database.
    Give me a place to stand and I will move the Earth

  3. #3
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    How does the data get into your datagrid?
    Do you populate it manually from user entries or by retrieving data from a table and then dropping your connection?

    If you are populating the datagrid from user entries, try creating a table in your form and set it as the datasource for your grid. Then for each entry that you want to add to the grid, create a new datarow and add it to the table and refresh your grid.

    There are a few ways to get your data back to the database. The first is by using a dataset and adding your datatable to it. Then associate an insert and/or update command object with your dataset. Finally you want to ensure you have a connection object associated with your dataset so that you can call the update method associated with your dataadapter.

    I don't know your level of experience with ADO.NET so I'm making a lot of assumptions here that you know each of these objects and their purpose. If you need additional assistance, just ask, and I'll try to help you as much as I can.

Posting Permissions

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



Click Here to Expand Forum to Full Width