Hello. I have XML document I use for backups..
I am using this code for importing XML to database:
protected void uvoziPodatkeXML(string backup, int tabela, string destinacijaTabela)
DataSet reportData = new DataSet();
FileStream filestream = File.OpenRead(lblPotIzvozi.Text + txtIme.Text + backup);
BufferedStream buffered = new BufferedStream(filestream);
//reportData.ReadXml(lblPotIzvozi.Text + txtIme.Text + backup);
SqlConnection povezava = new SqlConnection(Convert.ToString(Session["cs"]));
SqlBulkCopy sbc = new SqlBulkCopy(Convert.ToString(Session["cs"]), SqlBulkCopyOptions.KeepIdentity);
sbc.DestinationTableName = destinacijaTabela;
But there is a problem when XML file is very large, larger than 50MB, it lasts forever to import to database.. I was searching over google, and saw that datasets are terrible slow for this operation.. I found some other methodes for use, but don't know there are no examples, that could help me.
Did someone work on this before?
View Complete Post