Click here to Skip to main content
16,014,838 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Convert code from C# to VB Pin
Wendelius9-Sep-08 10:21
mentorWendelius9-Sep-08 10:21 
GeneralRe: Convert code from C# to VB Pin
Code1089-Sep-08 10:37
Code1089-Sep-08 10:37 
GeneralRe: Convert code from C# to VB Pin
Wendelius9-Sep-08 10:42
mentorWendelius9-Sep-08 10:42 
GeneralRe: Convert code from C# to VB Pin
Code1089-Sep-08 11:15
Code1089-Sep-08 11:15 
GeneralRe: Convert code from C# to VB Pin
Wendelius9-Sep-08 11:29
mentorWendelius9-Sep-08 11:29 
GeneralRe: Convert code from C# to VB Pin
Daniel Grunwald10-Sep-08 2:52
Daniel Grunwald10-Sep-08 2:52 
AnswerRe: Convert code from C# to VB Pin
Paul Conrad9-Sep-08 11:50
professionalPaul Conrad9-Sep-08 11:50 
QuestionFile IO Pin
Hetkeval9-Sep-08 8:58
Hetkeval9-Sep-08 8:58 
I have wrote below code for creating Text file and then after storing line by line value in Text File.

If Not System.IO.File.Exists(strFileName) Then
Dim fs As FileStream = File.Create(strFileName)
fs.Flush()
fs.Close()
End If

Dim ObjFile As StreamWriter
ObjFile = File.AppendText(strFileName)
ObjFile.WriteLine(Now() & "---" & strStatus & "---"&strErrMsg)
ObjFile.Flush()
ObjFile.Close()

My problem is while i am running my autoprocess in server it gives me error like "The process cannot access the file XYZ.txt because it is being used by another process"

What is wrong in this code as i had close file as well object also.

Thanks.
AnswerRe: File IO Pin
Wendelius9-Sep-08 9:18
mentorWendelius9-Sep-08 9:18 
GeneralRe: File IO Pin
Hetkeval9-Sep-08 10:17
Hetkeval9-Sep-08 10:17 
GeneralRe: File IO Pin
Wendelius9-Sep-08 10:28
mentorWendelius9-Sep-08 10:28 
GeneralRe: File IO Pin
Hetkeval9-Sep-08 11:35
Hetkeval9-Sep-08 11:35 
GeneralRe: File IO Pin
Wendelius9-Sep-08 11:43
mentorWendelius9-Sep-08 11:43 
QuestionExcel Data to Sql Database Pin
DrukenProgrammer9-Sep-08 8:50
DrukenProgrammer9-Sep-08 8:50 
AnswerRe: Excel Data to Sql Database Pin
dan!sh 9-Sep-08 9:07
professional dan!sh 9-Sep-08 9:07 
GeneralRe: Excel Data to Sql Database Pin
DrukenProgrammer9-Sep-08 9:11
DrukenProgrammer9-Sep-08 9:11 
AnswerRe: Excel Data to Sql Database Pin
Wendelius9-Sep-08 9:21
mentorWendelius9-Sep-08 9:21 
GeneralRe: Excel Data to Sql Database Pin
DrukenProgrammer9-Sep-08 9:31
DrukenProgrammer9-Sep-08 9:31 
GeneralRe: Excel Data to Sql Database Pin
Wendelius9-Sep-08 9:36
mentorWendelius9-Sep-08 9:36 
Question[Message Deleted] Pin
Rafone9-Sep-08 6:51
Rafone9-Sep-08 6:51 
AnswerRe: Arrays in VB Pin
Gregory Gadow9-Sep-08 7:41
Gregory Gadow9-Sep-08 7:41 
AnswerRe: Arrays in VB Pin
Rafone9-Sep-08 8:35
Rafone9-Sep-08 8:35 
GeneralRe: Arrays in VB Pin
Gregory Gadow9-Sep-08 12:03
Gregory Gadow9-Sep-08 12:03 
AnswerRe: Arrays in VB Pin
Rafone9-Sep-08 12:03
Rafone9-Sep-08 12:03 
QuestionImporting XLS file to DataTable Pin
Codemonkey859-Sep-08 5:10
Codemonkey859-Sep-08 5:10 

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.