Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi

 

the following code creates a memorystream from a string. this stream is then supposed to be used as source for a dataset.

 

but this doesn't work. any ideas?

 

best regards

 

 

 

Dim s As String = ""

Dim pStream As New System.IO.MemoryStream

Dim pEncoding As New System.Text.UnicodeEncoding

Dim pBuffer As Byte()

 

s = "<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?>"

s = s & "<RESULTS>"

s = s & "<TABLE "

s = s & "ID='1'"

s = s & "ADDRESS='SRARR' />"

s = s & "</RESULTS>"

pBuffer = pEncoding.GetBytes(s)

pStream.Write(pBuffer, 0, pBuffer.Length)

 

pDS.ReadXml(pStream)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...