注意:ACCESS数据库不支持此操作
DataSet ds = new DataSet();
ds.ReadXml(new StringReader(sbuf.ToString())); //从字符串装载XML
DataTable mytable = ds.Tables[0];
//MessageBox.Show(mytable.Rows[1]["msgid"].ToString()); //将XML装载到DataSet后,可通过行和列来进行访问
SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(connStr, SqlBulkCopyOptions.UseInternalTransaction);
sqlbulkcopy.DestinationTableName = "inbox";
sqlbulkcopy.WriteToServer(ds.Tables[0]);
没有评论:
发表评论