Aah yes, silly me, I forgot about the pointer. Thank you!
Ostrich22
Posts
-
C# - Using Memory Streams with XML [modified] -
C# - Using Memory Streams with XML [modified]I have come across an interesting problem. If I have a DataSet which I've read from an XML file. Then I call WriteXML to my memory stream. If I try read it back into a dataset I get the following error "Root Element is missing" here is some example code.
DataSet ds = new DataSet(); ds.ReadXmlSchema(@"C:\Foo\FooSchema.xsd"); ds.ReadXML(@"C:\Foo\Foo.xml"); MemoryStream ms = new MemoryStream(); ds.WriteXml(ms); ds.ReadXml(ms); //Error occurs.
Does anyone know why? or how I can use a DataSet to read directly from a MemoryStream?modified on Tuesday, October 20, 2009 9:58 AM
-
Saving bitmap to JPG in Compact Framework 2I've been on the MSDN and it has example code on how to save an image to jpg format, they say its compatible in the Compact Framework 2 but it doesn't seem to work. Here is my Code: Dim img As Bitmap img = New Bitmap(PictureBox1.Image) img.Save("Bob.jpg", ImageFormat.Jpeg) The PictureBox1 contral has a picture already. if I try save it as a BMP there is no problem. but to any other format it system returns a nonreferenced Exception. Any Help would be greatly appreciated. Thank you
-
Set password on existing excel applicationIn office XP I do it like so: xlSheet.Protect(Password:="SomePassWord", _ DrawingObjects:=True, _ Contents:=True, _ Scenarios:=True, _ UserInterfaceOnly:=True, _ AllowFormattingCells:=True, _ AllowFormattingColumns:=False, _ AllowFormattingRows:=False, _ AllowInsertingColumns:=False, _ AllowInsertingRows:=True, _ AllowInsertingHyperlinks:=False, _ AllowDeletingColumns:=False, _ AllowDeletingRows:=True, _ AllowSorting:=True, _ AllowFiltering:=True, _ AllowUsingPivotTables:=False) Its not necessary to have all the following settings, but I like to leave them there