Click here to Skip to main content
15,896,201 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Problem to insert data from DateTimePicker to Access database Pin
Wendelius26-Jan-09 5:17
mentorWendelius26-Jan-09 5:17 
AnswerRe: Problem to insert data from DateTimePicker to Access database Pin
Mr Oizo26-Jan-09 1:13
Mr Oizo26-Jan-09 1:13 
AnswerRe: Problem to insert data from DateTimePicker to Access database Pin
ivo7526-Jan-09 6:23
ivo7526-Jan-09 6:23 
QuestionInsert New Line in File Stream Pin
IvanIT25-Jan-09 5:56
IvanIT25-Jan-09 5:56 
AnswerRe: Insert New Line in File Stream Pin
N a v a n e e t h25-Jan-09 6:04
N a v a n e e t h25-Jan-09 6:04 
GeneralRe: Insert New Line in File Stream Pin
IvanIT25-Jan-09 6:42
IvanIT25-Jan-09 6:42 
GeneralRe: Insert New Line in File Stream Pin
Dave Kreskowiak25-Jan-09 10:05
mveDave Kreskowiak25-Jan-09 10:05 
GeneralRe: Insert New Line in File Stream Pin
IvanIT26-Jan-09 7:46
IvanIT26-Jan-09 7:46 
Dave, this is an excerpt of the code I used; the result is that the line is insert 1 time at the end of the text file rather than immediately after each occurence of my search string:

Private Sub btnTranslate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTranslate.Click<br />
        MessageBox.Show("you are about to translate file")<br />
<br />
        'read the file to find data<br />
        Dim sReader As New IO.StreamReader("C:\moviez_21.txt")<br />
        Dim CurrentLine As String<br />
<br />
        Dim DataLines As New System.Collections.Specialized.StringCollection<br />
<br />
        CurrentLine = sReader.ReadLine<br />
        If CurrentLine.StartsWith("PRV*PE*ZZ*") = True Then<br />
            sReader.ReadToEnd()<br />
        End If<br />
        sReader.Close()<br />
<br />
        'modifying the  file<br />
        Dim oError As System.IO.StreamWriter<br />
        oError = New System.IO.StreamWriter("c:\moviez_21.txt", True)<br />
<br />
        'text to be inserted in after PRV*PE*ZZ*<br />
        oError.Write("REF*LU*") ' + file number<br />
        oError.Close()<br />
    End Sub


Where did I go wrong?
GeneralRe: Insert New Line in File Stream Pin
Dave Kreskowiak26-Jan-09 11:35
mveDave Kreskowiak26-Jan-09 11:35 
GeneralRe: Insert New Line in File Stream Pin
IvanIT26-Jan-09 12:36
IvanIT26-Jan-09 12:36 
QuestionRemote Connection MSSQL Express2005 Pin
r_mohd25-Jan-09 3:52
r_mohd25-Jan-09 3:52 
AnswerRe: Remote Connection MSSQL Express2005 Pin
Wendelius25-Jan-09 4:18
mentorWendelius25-Jan-09 4:18 
QuestionMCiWnd api problem. Pin
V.G24-Jan-09 18:31
V.G24-Jan-09 18:31 
AnswerRe: MCiWnd api problem. Pin
Christian Graus25-Jan-09 0:45
protectorChristian Graus25-Jan-09 0:45 
GeneralRe: MCiWnd api problem. Pin
V.G25-Jan-09 2:33
V.G25-Jan-09 2:33 
GeneralRe: MCiWnd api problem. Pin
Dave Kreskowiak25-Jan-09 5:18
mveDave Kreskowiak25-Jan-09 5:18 
QuestionNeed intro to TcpListener & TcpClient Pin
VIP-CoMmAnDo24-Jan-09 15:52
VIP-CoMmAnDo24-Jan-09 15:52 
AnswerRe: Need intro to TcpListener & TcpClient Pin
Dave Kreskowiak25-Jan-09 5:08
mveDave Kreskowiak25-Jan-09 5:08 
QuestionUse Interface imported from COM dll Pin
o m n i24-Jan-09 12:52
o m n i24-Jan-09 12:52 
AnswerRe: Use Interface imported from COM dll Pin
Dave Kreskowiak25-Jan-09 5:07
mveDave Kreskowiak25-Jan-09 5:07 
QuestionRe: Use Interface imported from COM dll Pin
o m n i25-Jan-09 5:29
o m n i25-Jan-09 5:29 
QuestionHow to submit vb.net form Pin
Riyaz.R24-Jan-09 10:46
Riyaz.R24-Jan-09 10:46 
AnswerRe: How to submit vb.net form Pin
Dave Kreskowiak24-Jan-09 11:03
mveDave Kreskowiak24-Jan-09 11:03 
AnswerRe: How to submit vb.net form Pin
Ashutosh Phoujdar26-Jan-09 19:49
Ashutosh Phoujdar26-Jan-09 19:49 
QuestionNeed Help! Pin
ShayanTanwir24-Jan-09 7:00
ShayanTanwir24-Jan-09 7:00 

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.