Dear guys,
now i am coding for a project that require the program must browse and import any text file into a table (named: import) in Access database (named: test.mdb)
I just code for browse button and i don't know how to code for importing as well as updating, inserting text files into that table in Access.
plz...plz...help me...very urgent. Thanks in advance!
this is my coding for browse button:
now i am coding for a project that require the program must browse and import any text file into a table (named: import) in Access database (named: test.mdb)
I just code for browse button and i don't know how to code for importing as well as updating, inserting text files into that table in Access.
plz...plz...help me...very urgent. Thanks in advance!
this is my coding for browse button:
VB.NET:
Dim alltext, lineoftext As String
OpenFileDialog1.Filter = "Text files (*.txt)|*.TXT"
OpenFileDialog1.ShowDialog()
If OpenFileDialog1.FileName <> " " Then
Try
FileOpen(1, OpenFileDialog1.FileName, OpenMode.Input)
Do Until EOF(1)
lineoftext = LineInput(1)
alltext = alltext & lineoftext & vbCrLf
Loop
lblNote.Text = OpenFileDialog1.FileName
txtNote.Text = alltext
txtNote.Select(1, 0)
txtNote.Enabled = True
Catch ex As Exception
MsgBox("Error opening file.")
Finally
FileClose(1)
End Try
End If