473,378 Members | 1,555 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,378 software developers and data experts.

Dataset to table

Hi

I have a sub method that has been passed a dataset as parameter. I need to
insert this dataset into a table. What is the code that I need to do this?
The dataset does not have any conflicting keys so it is a very easy scenario
from conflict resolution point of view.

Thanks

Regards
Dec 28 '05 #1
8 1132
John,

I assume that you don't confuse alone me.

A dataset is a kind of wrapper around datatables which holds datarows.

In what kind of table do you want to put the dataset?

Cor
Dec 28 '05 #2
Just a normal sql server table.

Thanks

Regards

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:eT**************@TK2MSFTNGP11.phx.gbl...
John,

I assume that you don't confuse alone me.

A dataset is a kind of wrapper around datatables which holds datarows.

In what kind of table do you want to put the dataset?

Cor

Dec 28 '05 #3
John,

Than you mean probably the datatable of the dataset.
Is that in an existing table with the same description or do you want to
store a datatable as a complete new datatable.

In other words do you want to use the description of the dataset/datatable
to create new table(s) in your server?

Cor
Dec 28 '05 #4
No, the dataset comes from a table which is identical in structure to the
destination table. I only need the current data in the dataset (datatable?)
to be inserted in the destination table.

Thanks

Regards

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:e$**************@TK2MSFTNGP12.phx.gbl...
John,

Than you mean probably the datatable of the dataset.
Is that in an existing table with the same description or do you want to
store a datatable as a complete new datatable.

In other words do you want to use the description of the dataset/datatable
to create new table(s) in your server?

Cor

Dec 28 '05 #5
Cor,

I think his scenario is that he gets a dataset with one datatable in it,
with a bunch of rows. He then wants to insert these rows into the database.

I already told him in another thread, that this question has been asked many
many times, and that he should search old postings as well as do research on
the internet on how to do this. But he just wants us to do it all for him?

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:e$**************@TK2MSFTNGP12.phx.gbl...
John,

Than you mean probably the datatable of the dataset.
Is that in an existing table with the same description or do you want to
store a datatable as a complete new datatable.

In other words do you want to use the description of the dataset/datatable
to create new table(s) in your server?

Cor

Dec 28 '05 #6
Saying how to insert the dataset is doing it all for me? Hardly. Its easy to
search for broad topics in Google but specifics are hard to find specially
when almost everything in net has million variations.

Regards

"Marina" <so*****@nospam.com> wrote in message
news:O7**************@TK2MSFTNGP15.phx.gbl...
Cor,

I think his scenario is that he gets a dataset with one datatable in it,
with a bunch of rows. He then wants to insert these rows into the
database.

I already told him in another thread, that this question has been asked
many many times, and that he should search old postings as well as do
research on the internet on how to do this. But he just wants us to do it
all for him?

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:e$**************@TK2MSFTNGP12.phx.gbl...
John,

Than you mean probably the datatable of the dataset.
Is that in an existing table with the same description or do you want to
store a datatable as a complete new datatable.

In other words do you want to use the description of the
dataset/datatable to create new table(s) in your server?

Cor


Dec 28 '05 #7
Are you saying you have found nothing on this topic? This is not all that a
specific thing, it's pretty basic.

Have you tried writing anything to do this? Have you tried actually finding
information?

Have you been reading about how datasets work? Looking at examples that use
dataset to do various operations? Reading documentation?

I suspect that if you had been, you would have had a more specific question
then 'how do move data into a database'. I can't even imagine what sort of
answer you expected - code that is ready to go and working? It's not as if
there is one subtle aspect of this that is causing you problems - you sort
of want the whole thing.

It's not as if you are going to find something that 100% is your situation.
But you will find something close. You will find articles that teach you
about how to use these objects, and you will start to experiment and try
writing code, and learn that way.

I put the following search terms into google: insert rows dataset database

I got the following hits just on the first page of the results that talk
about various techniques for moving data from a dataset into the database,
as well as the ADO.NET object model.

http://samples.gotdotnet.com/quickst...ataFromDB.aspx
http://msdn.microsoft.com/library/de...terdataset.asp
http://www.akadia.com/services/dotnet_update_form.html

I think with a little bit of effort you could have found this, and much more
as well.

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
Saying how to insert the dataset is doing it all for me? Hardly. Its easy
to search for broad topics in Google but specifics are hard to find
specially when almost everything in net has million variations.

Regards

"Marina" <so*****@nospam.com> wrote in message
news:O7**************@TK2MSFTNGP15.phx.gbl...
Cor,

I think his scenario is that he gets a dataset with one datatable in it,
with a bunch of rows. He then wants to insert these rows into the
database.

I already told him in another thread, that this question has been asked
many many times, and that he should search old postings as well as do
research on the internet on how to do this. But he just wants us to do it
all for him?

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:e$**************@TK2MSFTNGP12.phx.gbl...
John,

Than you mean probably the datatable of the dataset.
Is that in an existing table with the same description or do you want to
store a datatable as a complete new datatable.

In other words do you want to use the description of the
dataset/datatable to create new table(s) in your server?

Cor



Dec 28 '05 #8
Sheer amount of information retrieved and the need to look for the specific
point in the code haystack proves my point but hey I am not complaining...

"Marina" <so*****@nospam.com> wrote in message
news:Ok****************@TK2MSFTNGP10.phx.gbl...
Are you saying you have found nothing on this topic? This is not all that
a specific thing, it's pretty basic.

Have you tried writing anything to do this? Have you tried actually
finding information?

Have you been reading about how datasets work? Looking at examples that
use dataset to do various operations? Reading documentation?

I suspect that if you had been, you would have had a more specific
question then 'how do move data into a database'. I can't even imagine
what sort of answer you expected - code that is ready to go and working?
It's not as if there is one subtle aspect of this that is causing you
problems - you sort of want the whole thing.

It's not as if you are going to find something that 100% is your
situation. But you will find something close. You will find articles that
teach you about how to use these objects, and you will start to experiment
and try writing code, and learn that way.

I put the following search terms into google: insert rows dataset database

I got the following hits just on the first page of the results that talk
about various techniques for moving data from a dataset into the database,
as well as the ADO.NET object model.

http://samples.gotdotnet.com/quickst...ataFromDB.aspx
http://msdn.microsoft.com/library/de...terdataset.asp
http://www.akadia.com/services/dotnet_update_form.html

I think with a little bit of effort you could have found this, and much
more as well.

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
Saying how to insert the dataset is doing it all for me? Hardly. Its easy
to search for broad topics in Google but specifics are hard to find
specially when almost everything in net has million variations.

Regards

"Marina" <so*****@nospam.com> wrote in message
news:O7**************@TK2MSFTNGP15.phx.gbl...
Cor,

I think his scenario is that he gets a dataset with one datatable in it,
with a bunch of rows. He then wants to insert these rows into the
database.

I already told him in another thread, that this question has been asked
many many times, and that he should search old postings as well as do
research on the internet on how to do this. But he just wants us to do
it all for him?

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:e$**************@TK2MSFTNGP12.phx.gbl...
John,

Than you mean probably the datatable of the dataset.
Is that in an existing table with the same description or do you want
to store a datatable as a complete new datatable.

In other words do you want to use the description of the
dataset/datatable to create new table(s) in your server?

Cor



Dec 28 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: theWizK | last post by:
Hello all. I have noticed that when I generate a strongly-typed dataset from an xml schema that the DataTables that are generated have their constructors marked as internal. What this means is...
3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
13
by: Adie | last post by:
Hi, is this not possible? public DataSet getDimensions() { } public SqlDataReader getDimensions() { }
7
by: Sharon | last post by:
I have successfully loaded a DataSet object with a XML schema (XSD). Now I wish to populate the tables that was created in the DataSet. I have an XML file/string that contain all the needed data...
15
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
22
by: EMW | last post by:
Hi, I managed to create a SQL server database and a table in it. The table is empty and that brings me to my next chalenge: How can I get the info in the table in the dataset to go in an empty...
16
by: Geoff Jones | last post by:
Hi Can anybody help me with the following, hopefully simple, question? I have a table which I've connected to a dataset. I wish to add a new column to the beginning of the table and to fill...
3
by: P K | last post by:
Hello, I have a dataset which is already loaded with data in one table. so dataset.tables("data") exists and has data. Now, I have to add another table to the dataset. The source for this...
5
by: codefragment | last post by:
Hi I have a dataset which holds (amongest other things) a string. - The dataset gets loaded from the database via a middle tier - The string value contains "\r\n" - Its serialised to the web...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.