I apologize, I realize in re-reading my post that I wasn't quite clear. That label was just to confirm that I was successfully able to traverse the gridview and determine which records the user had chosen. Parsing the string is not where I'm stuck. My issue is this: I am not sure what object to use to port the selected records from the Access datasource of the gridview over to the SQL database destination table. The table structures are similar but not exactly the same. I am much more familiar with VBA and DAO, so maybe if I explain how I'd do it there, then you can tell me of an equivalent process I could do in ADO.Net. In DAO, I would do this series of steps:
1. Create a connection to the Access db (source) 2. Create a connection to the SQL db (destination) 3. Run a SELECT statement on the source table to obtain only the selected records and store the results in a recordset 4. Traverse through the results recordset and append the new records to the destination table. I have done some reading on DataSet and DataTable objects, but the reading has left me confused on when and how to use them, and whether that's what I need to use for this situation. Hope that helps you help me :) Jana On Jul 18, 7:18 am, Stephen Russell <[email protected]> wrote: > On Mon, Jul 18, 2011 at 1:48 AM, DotNet Newbie <[email protected]> wrote: > > Good evening. I have a GridView linked to an Access 2000 database. The > > GridView has a template field with a checkbox to allow the user to select > > records. What I want to do is then take those selected records and insert > > them into an MS SQL database. After hours of reading online and trying to > > figure this out, I still remain confused on how to accomplish this using C# > > and ado.net. Please note, I am not trying to copy the entire table from > > Access, just certain fields from the table. I am using this code to confirm > > that I can successfully determine which records have been selected in the > > GridView, but now I'm stuck. Here's the code I have so far, which right now > > is writing the list of selected records to an asp label: > > ---------- > > Do you know how to parse out a string looking for any value between > your ; delimiter? > > If you do make a method that will receive that string and identify > each item you plucked from the grid. > > That method will also do the request for the insert or do it there. > > Stephen > -- > Stephen Russell > > Unified Health Services > 60 Germantown Court > Suite 220 > Cordova, TN 38018 > > Telephone: 888.510.2667 > > 901.246-0159 cell -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net
