473,473 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Insert Dataset from a web service into DataBase(SQL Server)

Hi,

I get a Dataset from a web service. I'de like to empty a table in my
local SQL Server and insert my Dataset (from the web service) into
this, now empty, table.

Something like (but working):
private void insertData(string type){
connectionString=ConfigurationSettings.AppSettings["DBConnectionString"];
SqlConnection _sqlcon = new SqlConnection(connectionString);
DataSet ds=new DataSet();
ds=this._webServ.GetPlayersCosts(type);

SqlDataAdapter da = new SqlDataAdapter(sql,this._sqlcon);
da.Fill(ds);
da.Update();
_sqlcon.Close();
}

Thank you for your answers, advices.

Nov 17 '05 #1
1 8346
Set the AcceptChangesDuringFill property of the adapter for False before
you call fill. Then you can just use Update and the data will move.

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Pierre" <bu****@no-log.org> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi,

I get a Dataset from a web service. I'de like to empty a table in my
local SQL Server and insert my Dataset (from the web service) into
this, now empty, table.

Something like (but working):
private void insertData(string type){
connectionString=ConfigurationSettings.AppSettings["DBConnectionString"];
SqlConnection _sqlcon = new SqlConnection(connectionString);
DataSet ds=new DataSet();
ds=this._webServ.GetPlayersCosts(type);

SqlDataAdapter da = new SqlDataAdapter(sql,this._sqlcon);
da.Fill(ds);
da.Update();
_sqlcon.Close();
}

Thank you for your answers, advices.

Nov 17 '05 #2

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

Similar topics

3
by: cooldv | last post by:
i am running a website on Windows 2000 server with ASP 3 webpages and Access 2000 database. (with a hosting company) traffic is slow at this time but expect to grow. lately i have been reading...
2
by: Szaki | last post by:
Hello, I have a some xml file and database. How import this file to database? I must do aplication in VB .NET whose show imports some xml file to database SQL SERVER 2000? Do you have any idea?...
10
by: Ricardo | last post by:
How can I make a insert sql string to insert direct in a table(not a dataset) using the textbox.text propert??
5
by: Iwan Petrow | last post by:
Hi, I have Win application -> Web service -> Sql Server. The user input date and time in format dd/MM/yy hh:mm. I convert it to datetime and send it to a web service which save it to the db. But...
5
by: B.J. | last post by:
Hi, Where I can change Web service server side timeout ? Because my service time out and I set WebClientProtocol.Timeout to infinite. (According to...
1
by: stevesnow | last post by:
---------------------------------------------- Please forward this work experience & skills summary to your Database & software development, MIS/IT/Software Department for review. ...
0
by: rob | last post by:
Hi Everyone, I am using managed c++ to convert hash table to insert sql statement. Anyone has experience using some class to do it? database: sql anywhere 9.02 Thanks, Robert
2
by: Luzuko | last post by:
HI, Im doing a project and the basic requirements of the project is that my Front-end application (VB 2005) and Web application(VB Scripting and ASP) should write and retrieve from the SAME...
2
by: Wendi Turner | last post by:
ASP.NET 2.0 C# WebService Connect to Database: Sql Server 2005 --------------------------------------------------------------------------------------------------- I have successfully created a...
2
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a server 2008 IIS 7.0 with indexing service installed. I have created the catalog and have a test page using these posts:...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.