473,396 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Catch Stream as a String

Hi All,

I want to catch a stream as a string.....please see below:

Dim stXML As Stream
Dim sReturn as string
dsResult.WriteXml(stXML)

I want the value of the stream stXML as a string. stXML is a stream.

Thanks in anticipation.
Regards
Rohit
Nov 22 '05 #1
1 1561
Rohit,
Have you considered using a StreamReader to read the Stream?

Something like (untested):
Dim stXML As Stream Dim reader As New StreamReader(stXML) Dim sReturn as string sReturn = reader.ReadToEnd()

Hope this helps
Jay

"Rohit Sharma" <lt*************@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP09.phx.gbl... Hi All,

I want to catch a stream as a string.....please see below:

Dim stXML As Stream
Dim sReturn as string
dsResult.WriteXml(stXML)

I want the value of the stream stXML as a string. stXML is a stream.

Thanks in anticipation.
Regards
Rohit

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rohit Sharma | last post by:
Hi All, I want to catch a stream as a string.....please see below: Dim stXML As Stream Dim sReturn as string dsResult.WriteXml(stXML) I want the value of the stream stXML as a string....
0
by: Bryan Olson | last post by:
New and improved! Love Python's stack-tracing error messages, but hate the way GUI applications throw the messages away and crash silently? Here's a module to show Python error messages that...
7
by: Alan Paulk | last post by:
It seems to me if you have a function like this public void blah() try { blah blah; } catch
7
by: BC | last post by:
Hi all, I have a method that accepts a string as the parameter. This can be a base64 image string, or just a normal string. Currently to test whether it's a image string or just a normal string,...
5
by: Doug Gifford | last post by:
WROX "Beginning VB.Net" 2nd Edition Using this code from Chapter 11 Page 472: Do Try ' Read a line from the file... currentLine = myReader.ReadLine lineCounter = lineCounter + 1 Catch e As...
28
by: RickHodder | last post by:
I'm getting frustrated with using try...catch with local variables: The code below wont compile in .NET 1.1: I get the following error: "Use of unassigned local variable 'oProcessFileReader' " ...
9
by: Eran.Yasso | last post by:
Hi, My app starts process. Some times this process exits because of exception. Can my app know if the process exited due to exception or gracefully? In both ways, the exit code of this...
22
by: Amali | last post by:
I'm newdie in c programming. this is my first project in programming. I have to write a program for a airline reservation. this is what i have done yet. but when it runs it shows the number of...
5
by: mc | last post by:
I have a function (shown below) that I call to check if a server is present. when a server is present, everything is ok. however when it fails. I get an SocketException fired. On my development...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.