Click here to Skip to main content
15,904,497 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: showing parts of the table in datagrid Pin
_mubashir26-Aug-05 5:19
_mubashir26-Aug-05 5:19 
GeneralRe: showing parts of the table in datagrid Pin
Anonymous28-Aug-05 3:37
Anonymous28-Aug-05 3:37 
QuestionCrystal Report Pin
Jeeva Jose26-Aug-05 2:08
Jeeva Jose26-Aug-05 2:08 
AnswerRe: Crystal Report Pin
Rizwan Bashir26-Aug-05 2:34
Rizwan Bashir26-Aug-05 2:34 
QuestionFTP Class Pin
ADY00726-Aug-05 1:08
ADY00726-Aug-05 1:08 
AnswerRe: FTP Class Pin
Rizwan Bashir26-Aug-05 4:33
Rizwan Bashir26-Aug-05 4:33 
Questionhow to delete a file after processing Pin
Rizwan Bashir26-Aug-05 0:38
Rizwan Bashir26-Aug-05 0:38 
AnswerRe: how to delete a file after processing Pin
Dave Kreskowiak26-Aug-05 1:43
mveDave Kreskowiak26-Aug-05 1:43 
Rizwan Bashir wrote:
tmp.Close()

You didn't call .Dispose() on the FileStream objects. Do that and you'll be all set.

Forget using the GC class for this. Just remove that code.

Dim txt As IO.File
Dim tmp As System.IO.FileStream
tmp = txt.Create("C:\abc.txt")
tmp.Close()
tmp.Dispose()    ' Tells the FileStream object to release the underlying unmanaged file handle
If txt.Exists("C:\abc.txt") = True Then
fl = txt.AppendText("C:\abc.txt")
fl.Write("testing")
fl.Close()
fl.Dispose()        ' Same thing...
End If
 
The next four lines are unneccessary
'fl=nothing
'txt = Nothing
'GC.WaitForPendingFinalizers()
'GC.Collect()
 
System.IO.File.Delete("C:\abc.txt")



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: how to delete a file after processing Pin
Rizwan Bashir26-Aug-05 1:49
Rizwan Bashir26-Aug-05 1:49 
GeneralRe: how to delete a file after processing Pin
Dave Kreskowiak26-Aug-05 5:06
mveDave Kreskowiak26-Aug-05 5:06 
GeneralRe: how to delete a file after processing Pin
Rizwan Bashir26-Aug-05 5:09
Rizwan Bashir26-Aug-05 5:09 
GeneralRe: how to delete a file after processing Pin
Dave Kreskowiak26-Aug-05 6:19
mveDave Kreskowiak26-Aug-05 6:19 
Answer[Msg Deleted] Pin
progload26-Aug-05 5:10
progload26-Aug-05 5:10 
QuestionWindows User Pin
zerokill25-Aug-05 21:40
zerokill25-Aug-05 21:40 
AnswerRe: Windows User Pin
Steven Amani26-Aug-05 7:33
Steven Amani26-Aug-05 7:33 
GeneralRe: Windows User Pin
zerokill28-Aug-05 18:05
zerokill28-Aug-05 18:05 
QuestionDatagrids Readonly Access Pin
_mubashir25-Aug-05 20:37
_mubashir25-Aug-05 20:37 
QuestionInput from a device Pin
JJRW25-Aug-05 20:27
JJRW25-Aug-05 20:27 
AnswerRe: Input from a device Pin
Dave Kreskowiak26-Aug-05 1:37
mveDave Kreskowiak26-Aug-05 1:37 
GeneralRe: Input from a device Pin
Anonymous26-Aug-05 4:47
Anonymous26-Aug-05 4:47 
GeneralRe: Input from a device Pin
Dave Kreskowiak26-Aug-05 5:08
mveDave Kreskowiak26-Aug-05 5:08 
GeneralRe: Input from a device Pin
Anonymous29-Aug-05 22:21
Anonymous29-Aug-05 22:21 
GeneralRe: Input from a device Pin
Dave Kreskowiak30-Aug-05 2:35
mveDave Kreskowiak30-Aug-05 2:35 
Questionreturning a single value thru an OleDbCommand Pin
medicenpringles25-Aug-05 17:13
medicenpringles25-Aug-05 17:13 
AnswerRe: returning a single value thru an OleDbCommand Pin
_mubashir26-Aug-05 1:03
_mubashir26-Aug-05 1:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.