|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Howto Transfer data from the DataTable into a SQL Databaseproblem. I have an application that I created to transfers data dynamically from an unknown source (ie maybe Excel, Access, XML, or SQLServer) and imports it into a datatable and then on to the dataGridView for the user to see. The thing about that initial datasource is that the application will not know how its columns are formatted up until the data is actually sent through. By this I mean that the number of columns and the column name will vary. This data will comprise of a user's product library. There is another process that kicks in around this time that allows the user to search through thier file server to create an archive of all the file names that lie within. This data is held in memory only at this point through another dataTable. The final step of this process in where I'm having a problem. I would like to be able to compare the file names gathered from the file server (UPC#'s)into the dataTable with the product library that is held within the other datatable. I wanted to be able to do all of this within the system's memory and the dataTables instead of persisting those tables out to a database just to do an unmatched query on the data. Needless to say, I couldn't figure out how to do this. I don't think that its possible. So now that I have to persist the data out, I'm wondering what would be the best way to do this. I didn't want to nessasarily do it within SQL Server (unless thats the best way) because I don't want to assume that all my users will know how to install and setup SQL Server. I didn't know if I could do this with Access because they may not have Access on thier system (Though I think it doesn't matter). I was curious about doing it in XML but don't know how difficult it would be to query the data against each other afterwards. The thing about this is that the user will not need to keep the data within the file that I create because they will import the final results into their current data structure afterwards. The other problem is dynamically naming all the columns once the system is able to determine what data the user is sending to them. Thank you for your help. If you want do it all in memory. Check the container DataSet and you can use
a Relationships container to link the two DataTables but this second part it optinal. BStrick wrote: Show quoteHide quote > I would like to know what may be the "Best" way to approach with > problem. > > I have an application that I created to transfers data dynamically from > an unknown source (ie maybe Excel, Access, XML, or SQLServer) and > imports it into a datatable and then on to the dataGridView for the > user to see. The thing about that initial datasource is that the > application will not know how its columns are formatted up until the > data is actually sent through. By this I mean that the number of > columns and the column name will vary. This data will comprise of a > user's product library. > > There is another process that kicks in around this time that allows the > user to search through thier file server to create an archive of all > the file names that lie within. This data is held in memory only at > this point through another dataTable. > > The final step of this process in where I'm having a problem. I would > like to be able to compare the file names gathered from the file server > (UPC#'s)into the dataTable with the product library that is held within > the other datatable. > > I wanted to be able to do all of this within the system's memory and > the dataTables instead of persisting those tables out to a database > just to do an unmatched query on the data. Needless to say, I couldn't > figure out how to do this. I don't think that its possible. So now that > I have to persist the data out, I'm wondering what would be the best > way to do this. I didn't want to nessasarily do it within SQL Server > (unless thats the best way) because I don't want to assume that all my > users will know how to install and setup SQL Server. I didn't know if I > could do this with Access because they may not have Access on thier > system (Though I think it doesn't matter). I was curious about doing it > in XML but don't know how difficult it would be to query the data > against each other afterwards. > > The thing about this is that the user will not need to keep the data > within the file that I create because they will import the final > results into their current data structure afterwards. The other problem > is dynamically naming all the columns once the system is able to > determine what data the user is sending to them. > > Thank you for your help. |
|||||||||||||||||||||||