Jump to content
Xtreme .Net Talk

CyberHawke

Members
  • Posts

    4
  • Joined

  • Last visited

About CyberHawke

  • Birthday 03/02/1959

Personal Information

  • Occupation
    Senior Software Developer
  • Visual Studio .NET Version
    2003 Enterprise Architect
  • .NET Preferred Language
    C#

CyberHawke's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Sorry, I left out a minor detail that seems obvious to me, but maybe not as a buddy of mine looking over my shoulder pointed out. You need to set your datagrids datasource to the cloned datatable.
  2. Before I respond to this, I would like to ask if you intend to navigate forwards and backwards through your data. If the answer is yes then I'm sorry but Phylum's response won't work. The datareader is a one time use object, meaning that it reads your data a row at a time once, and then it is remanded to the care of the garbage collector. There are a couple of options, if you do intend a forward only read then Phylum's answer is probably the best, if you intend forward and backward navigation, then I would look at getting all your data into your dataset and then cloning your datatable from the dataset into a new datatable, and using the datatable.select method to copy rows from your source table into your cloned table, then use the datatable.clear method to clear out rows you copied there when you want to move to your next "page". The one issue you face here is that if your data at it's source is dynamic, then you will have to requery your source at whatever interval you determine to be satisifactory. I hope this helps you. If you need further clarification, feel free to ask anytime.
  3. lakkadghat, You are very close here, but what you are missing is a way to tell the dataadapter how to update your data source. It's actually beneficial to me that you are using the SqlClient here, because it is much easier to do this in Sql Server than in an OLEDB data source. Add the following line of code in your variable declarations section. Dim cb As SqlCommandBuilder = New SqlCommandBuilder(da) Without the command builder, the adapter has no way of knowing how to update your datasource. (btw, in an oledb data source, the process is much more manual.)
  4. Hey guys, I just found this thread in a search for something else. I work with Excel spreadsheets all the time using ADO.NET, and previously using ADO COM. I regularly read and compare data from sheets, and also submit updates as well as execute DDL statements to manipulate the structure of the sheet. If you have any questions, on data manipulation in Excel using ADO, feel free to ask any time. John
×
×
  • Create New...