By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,582 Members | 1,720 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,582 IT Pros & Developers. It's quick & easy.

Howto Transfer data from the DataTable into a SQL Database

P: n/a
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.

Feb 10 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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:
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.


Feb 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.