473,327 Members | 2,007 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,327 software developers and data experts.

Streamwriter

Dim sw As New IO.StreamWriter("File path")
sw.WriteLine ("This is a line of text")
sw.Flush()
sw.Close

I got this sample from Crouchie1998

but the vb program VB 6.0 doesn't recognise the IO.StreamWriter() part.
would there be a reason for this maybe I'm not using the right libary?
Nov 21 '05 #1
5 4425
Jon
Would have thought you'd need vb.net to use it, but perhaps not.

Could try System.IO.StreamWriter

Jon
"Opyuse" <Op****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
Dim sw As New IO.StreamWriter("File path")
sw.WriteLine ("This is a line of text")
sw.Flush()
sw.Close

I got this sample from Crouchie1998

but the vb program VB 6.0 doesn't recognise the IO.StreamWriter() part.
would there be a reason for this maybe I'm not using the right libary?

Nov 21 '05 #2
Jon
It's in

Mscorlib.dll

Jon
"Jon" <Em***********@SomewhereOrOther.com> wrote in message
news:OH**************@TK2MSFTNGP12.phx.gbl...
Would have thought you'd need vb.net to use it, but perhaps not.

Could try System.IO.StreamWriter

Jon
"Opyuse" <Op****@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
Dim sw As New IO.StreamWriter("File path")
sw.WriteLine ("This is a line of text")
sw.Flush()
sw.Close

I got this sample from Crouchie1998

but the vb program VB 6.0 doesn't recognise the IO.StreamWriter() part.
would there be a reason for this maybe I'm not using the right libary?


Nov 21 '05 #3
"Jon" <Em***********@SomewhereOrOther.com> schrieb:
Would have thought you'd need vb.net to use it, but perhaps not.


Yes, you need VB.NET.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4
Jon
Ignore that last post
"Jon" <Em***********@SomewhereOrOther.com> wrote in message
news:#G**************@TK2MSFTNGP10.phx.gbl...
It's in

Mscorlib.dll

Jon

Nov 21 '05 #5
Cheers afraid of that. just thought it looked better whated to see if I could
use it.

"Herfried K. Wagner [MVP]" wrote:
"Jon" <Em***********@SomewhereOrOther.com> schrieb:
Would have thought you'd need vb.net to use it, but perhaps not.


Yes, you need VB.NET.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6

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

Similar topics

33
by: | last post by:
Hi, When constructing StreamWriter with the following.. FileStream f = new FileStream(..); StreamWriter s = new StreamWriter(f); Then attempt to write out åäö letters they become garbage. ...
1
by: Vladimir Bezugliy | last post by:
I have a server that listen a socket. And I have next client: TcpClient socketForServer = new TcpClient("IVBEZUGLIY", 21000); NetworkStream networkStream = socketForServer.GetStream();...
4
by: Majed | last post by:
Hi , all I'm trying to write unicode to a file for another app (not developed with vs2003) to read it. I used StreamWriter with unicode encoding.but I was surprised that the streamwriter adds FFFE...
1
by: Daniel | last post by:
i would like to konw when the data sent so that i can close the streamwriter and networkstream is there some sort of call backs/events i have to implement for this to work? if so how? can i just...
1
by: Lars Hansen | last post by:
Hi This is probably pretty basic, but I have a problem with the access-level (local variable), when creating a new StreamWriter. I am trying to write some price information to a textfile - which...
9
by: ShadowOfTheBeast | last post by:
Hi, I have got a major headache understanding streamReader and streamWriter relationship. I know how to use the streamreader and streamwriter independently. but how do you write out using the...
4
by: rex64 | last post by:
I am getting an error message and I have not been able to figure hot how to fix it. I have done some research with no answers yet. I found this code that may help? Not sure what to do with it....
10
by: Oscar Thornell | last post by:
Hi, I generate and temporary saves a text file to disk. Later I upload this file to Microsoft MapPoint (not so important). The file needs to be in UTF-8 encoding and I explicitly use the...
1
by: Max Powers | last post by:
Hello, I have a VB.NET code that creates a StreamWriter file first and then it does a series of procedures that write lines for this StreamWriter. When all the procedures are done, the...
4
by: Heron | last post by:
Hi, Could someone explain me why the following code doesn't work? The memorystream always remains with length 0. MemoryStream input = new MemoryStream();
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.