Streamwriter
-
Dim objStreamWriter2 As StreamWriter
Dim DTString As StringDTString = "C:\\ETCLINK\\" + Convert.ToString(Date.Now) 'Pass the file path and the file name to the StreamWriter constructor. objStreamWriter2 = New StreamWriter(DTString)
I take a runtime error when the code is run. What is the problem? Thank you? (objStreamWriter2 = New StreamWriter("C:\ETCLINK\09042008121212.txt") no problem here
-
Dim objStreamWriter2 As StreamWriter
Dim DTString As StringDTString = "C:\\ETCLINK\\" + Convert.ToString(Date.Now) 'Pass the file path and the file name to the StreamWriter constructor. objStreamWriter2 = New StreamWriter(DTString)
I take a runtime error when the code is run. What is the problem? Thank you? (objStreamWriter2 = New StreamWriter("C:\ETCLINK\09042008121212.txt") no problem here
-
Dim objStreamWriter2 As StreamWriter
Dim DTString As StringDTString = "C:\\ETCLINK\\" + Convert.ToString(Date.Now) 'Pass the file path and the file name to the StreamWriter constructor. objStreamWriter2 = New StreamWriter(DTString)
I take a runtime error when the code is run. What is the problem? Thank you? (objStreamWriter2 = New StreamWriter("C:\ETCLINK\09042008121212.txt") no problem here
I would concur with the other reply, although if you actually gave us the error message, we could provide a better answer. If the problem is the resulting string from Date.Now, use the Format command to get the resulting string into the desired format.
Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.