streamwriter cuts off last line
streamwriter cuts off last line
streamwriter cuts off last line
streamwriter cuts off last line
streamwriter cuts off last line
streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line
streamwriter cuts off last line streamwriter cuts off last line
streamwriter cuts off last line
Go Back  Xtreme Visual Basic Talk > > > streamwriter cuts off last line


Reply
 
Thread Tools Display Modes
  #1  
Old 05-30-2003, 08:59 AM
Ryan Coomer Ryan Coomer is offline
Newcomer
 
Join Date: May 2003
Posts: 1
Default streamwriter cuts off last line


I am using the following bit of code, to pull some data from the database and output it to a file. When it writes out, it omits the last half of the last line. If i write each line twice, it writes it completely the first time and then omits the last half of the last line the second time. Otherwise, the output is exactly what I am after.

Can anyone shed some light on why this is happening?

Using VS.net. I cut out the uniteresting bits



Dim dreader As System.Data.OleDb.OleDbDataReader
Dim sw As New StreamWriter(mystream)
Dim x As String = ""

OleDbConnection1.Open()
dreader = sql2.ExecuteReader()


While dreader.Read()

x = <Database output> + cbcrlf
sw.Write(x)

End While


dreader.Close()
mystream.Close()
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drawing joined parallel line segments bart111 Game Programming 0 03-15-2003 06:32 PM
Load one line from a file Tludina General 4 12-19-2002 07:25 PM
Transfer private controls to another project.. Help! Jazler General 8 07-01-2002 09:59 AM
Component problem mhsueh001 General 3 05-28-2002 07:43 AM
How to goto end of the line or record line snownieve General 3 03-28-2001 01:14 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
streamwriter cuts off last line
streamwriter cuts off last line
streamwriter cuts off last line streamwriter cuts off last line
streamwriter cuts off last line
streamwriter cuts off last line
streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line streamwriter cuts off last line
streamwriter cuts off last line
streamwriter cuts off last line
 
streamwriter cuts off last line
streamwriter cuts off last line
 
-->