Click here to Skip to main content
16,011,120 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Receiving the error "There is already an open DataReader associated with this Command which must be closed first." Pin
Marcus J. Smith25-Nov-08 4:27
professionalMarcus J. Smith25-Nov-08 4:27 
Questiondelete questions Pin
yaya_star24-Nov-08 21:34
yaya_star24-Nov-08 21:34 
AnswerRe: delete questions Pin
Nanda_MR24-Nov-08 22:09
Nanda_MR24-Nov-08 22:09 
GeneralRe: delete questions Pin
yaya_star24-Nov-08 22:14
yaya_star24-Nov-08 22:14 
GeneralRe: delete questions Pin
indian14324-Nov-08 22:55
indian14324-Nov-08 22:55 
AnswerRe: delete questions Pin
Christian Graus24-Nov-08 23:08
protectorChristian Graus24-Nov-08 23:08 
GeneralRe: delete questions Pin
dan!sh 25-Nov-08 4:01
professional dan!sh 25-Nov-08 4:01 
QuestionHelp in reading File Pin
yaya_star24-Nov-08 21:28
yaya_star24-Nov-08 21:28 
Hi,

I have this file

11,misc,0008,AMM /RUH /DMM(RJ),0023,18:00-24:00,0002,RJ ,00704,AMM ,RUH ,060331,2200,000,5,001286,003,175,-01,001,006,N,000,000,000,000,000,000,000,000,000,000,Y,N,000,000,000,000,000,000000000,000000000,000000000,000,000,000.00,000,000.00,000,000
13,J,J ,001,003,175,000,000,000,Y,001,Y,N,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000430,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000286,000286,000430
14,J,J ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
13,J,U ,002,003,175,000,000,000,Y,001,N,Y,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000001,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000001,000001,000001
14,J,U ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
12,J,003,175,000,Y,N,000.00,000,000,000,000,000,000,000,000,000,000,000,000,000.00,000.00,000,000,000.00,000.00,001.00,000,000,000,000,000,000,000,000,000,N,N,N,N,000000000,000000000,000000000,000000000,000000000,000,000,000,000,000
13,Y,Y ,003,003,175,000,000,000,Y,003,Y,N,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000375,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000275,000275,000375
14,Y,Y ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
13,Y,S ,004,003,175,000,000,000,Y,003,N,N,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000253,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000124,000124,000253
14,Y,S ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
13,Y,N ,005,003,175,000,000,000,Y,004,N,N,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000243,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000207,000207,000243
14,Y,N ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
13,Y,M ,006,003,175,000,000,000,Y,005,N,N,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000227,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000185,000185,000227
14,Y,M ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
13,Y,H ,007,003,175,000,000,000,Y,006,N,N,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000210,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000111,000111,000210
14,Y,H ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
13,Y,B ,008,003,175,000,000,000,Y,007,N,N,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000190,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000166,000166,000190
14,Y,B ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
13,Y,G ,011,003,175,000,000,000,Y,010,N,Y,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000001,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000001,000001,000001
14,Y,G ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
13,Y,V ,012,003,175,000,000,000,Y,011,N,N,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000170,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000106,000106,000170
14,Y,V ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
13,Y,X ,013,003,175,000,000,000,Y,012,N,Y,000.00,023,000,000,000,000,000,000,000,000,Non,0000.00,0000.00,000,000,000,000,000,000.00,000.00,000,000,001.00,000.00,000.00,000,000,000,000,000,000,000,000,000,000001,N,N,N,N,-01,100,000,000,006,000,100,000,000,000,000000,000,000,000,000,000,000,000,000,000001,000001,000001
14,Y,X ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000

14,Y,T ,023,000,000,000,000,000,000,000,024,-01,000,000,000,000,000,000
12,Y,003,175,000,Y,N,000.00,000,000,000,000,000,000,000,000,000,000,000,000,000.00,000.00,000,000,000.00,000.00,0



i need to read the lines that start with 11 first, then the ones that starts with 12, then 13 and ignore 14...

i started with this code:

'Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser("C:\hi.txt")
' MyReader.TextFieldType = FileIO.FieldType.Delimited
' MyReader.CommentTokens = New String() {"14"}
' MyReader.SetDelimiters(",")
' Dim currentRow As String()
' Dim test As String = ""
' While Not MyReader.EndOfData
' currentRow = MyReader.ReadFields()
' Dim currentField As String
' For Each currentField In currentRow
'
' test &= currentField & " "
' TextBox2.Text = test
'
' End If
' Next

' End While
'End Using

can anyone help me?
AnswerRe: Help in reading File Pin
indian14324-Nov-08 21:43
indian14324-Nov-08 21:43 
GeneralRe: Help in reading File Pin
yaya_star24-Nov-08 21:52
yaya_star24-Nov-08 21:52 
GeneralRe: Help in reading File Pin
Ashfield24-Nov-08 22:10
Ashfield24-Nov-08 22:10 
GeneralRe: Help in reading File Pin
yaya_star24-Nov-08 22:15
yaya_star24-Nov-08 22:15 
GeneralRe: Help in reading File Pin
Ashfield25-Nov-08 1:13
Ashfield25-Nov-08 1:13 
AnswerRe: Help in reading File Pin
Christian Graus24-Nov-08 23:08
protectorChristian Graus24-Nov-08 23:08 
AnswerRe: Help in reading File Pin
riced26-Nov-08 1:55
riced26-Nov-08 1:55 
GeneralRe: Help in reading File Pin
yaya_star1-Dec-08 18:54
yaya_star1-Dec-08 18:54 
GeneralRe: Help in reading File Pin
riced3-Dec-08 13:13
riced3-Dec-08 13:13 
QuestionVisual Basic IDE [modified] Pin
indian14324-Nov-08 20:24
indian14324-Nov-08 20:24 
AnswerRe: Visual Basic IDE Pin
Christian Graus24-Nov-08 20:35
protectorChristian Graus24-Nov-08 20:35 
GeneralRe: Visual Basic IDE Pin
indian14324-Nov-08 21:07
indian14324-Nov-08 21:07 
GeneralRe: Visual Basic IDE Pin
Christian Graus24-Nov-08 21:23
protectorChristian Graus24-Nov-08 21:23 
GeneralRe: Visual Basic IDE Pin
indian14324-Nov-08 21:33
indian14324-Nov-08 21:33 
GeneralRe: Visual Basic IDE Pin
Paul Conrad25-Nov-08 18:33
professionalPaul Conrad25-Nov-08 18:33 
AnswerRe: Visual Basic IDE Pin
N a v a n e e t h24-Nov-08 21:24
N a v a n e e t h24-Nov-08 21:24 
GeneralRe: Visual Basic IDE Pin
indian14324-Nov-08 21:30
indian14324-Nov-08 21:30 

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.