Google Gruppi non supporta più i nuovi post o le nuove iscrizioni Usenet. I contenuti storici continuano a essere visibili.

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

4 visualizzazioni
Passa al primo messaggio da leggere

Pierre

da leggere,
12 mag 2005, 14:15:3412/05/05
a
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.

W.G. Ryan eMVP

da leggere,
12 mag 2005, 14:45:5512/05/05
a
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" <bub...@no-log.org> wrote in message
news:1115921734.3...@g14g2000cwa.googlegroups.com...

0 nuovi messaggi