473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Howto Transfer data from the DataTable into a SQL Database

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
1 2245
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: CSN | last post by:
Is it possible to iterate over an array in plpgsql? Something like: function insert_stuff (rel_ids int) .... foreach rel_ids as id insert into table (rel_id, val) values (id, 5);
3
by: Plumer | last post by:
Good morning everyone Using C# I create a bog-standard System.Data.DataTable which I then Add to a System.Data.Dataset (At the moment I'm in the guess-and-test phase so the table has only one...
10
by: Lars Grøtteland | last post by:
Hello! Was wondering how I can create a copy of one database? FYI I'm not interrested in the data, just the fields and triggers, and so on. Which way is the easiest? Do I create a script and...
4
by: Vlady | last post by:
Hello. I recently built an ASP.NET "financial" application. I got to the point where I have a HTML template (a contract) which needs to be filled with various data from the database. I put a...
11
by: Martin | last post by:
Hi, I understand you must first remove the constraint. The following bit does not work (where t is a DataTable). It gives a 'reference not set to an object' error ...
4
by: DEWright_CA | last post by:
Hi Everyone! I am working on a project in C# and have a table the contains state info, plus a variety of other info that I will reference from another dropdown list. How can I do this...
4
by: Ray Dukes | last post by:
What I am looking to do is map the implementation of interface properties and functions to an inherited method of the base class. Please see below. ...
0
by: NutsAboutVB | last post by:
Basically, the title explains it. I want to be able to read the first n bytes (say, 1024 bytes) of any file (text or binary) off the internet in my vb.net application. I specifically do not want...
9
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.