Re: SqlXml MemoryStream Bulk Load Errors

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Is is a build time error...
I have seen this article but it is using a rss feed and respose...

I am trying to test my bulk load method which takes a stream as a argument;
I mentioned in my first post using the following method...
private void btnBulkSqlLoad_Click(object sender, System.EventArgs e)
{
int intReturn = 0;
FileStream fs = new FileStream(@"C:\XMLData\LogDetails.xml", FileMode.Open);
MemoryStream ms = new MemoryStream(System.Convert.ToInt32(fs.Length));
StreamWriter sw = new StreamWriter( ms, new UTF8Encoding());
sw.Write( fs );
sw.Flush();
SomeDll.SomeClass obj = new SomeDll.SomeClass();
intReturn = obj.DoBulkInsert(ms);
}

C:\SomeClass.aspx.cs(1279): Argument '1': cannot convert from
'System.IO.MemoryStream' to 'SomeDll.SomeClass.MemoryStream'

.