Private Sub Command1_Click()
Dim a As New FileSystemObject
a.CreateTextFile "D:\Documents and Settings\nithya.s\Desktop\Medius.txt"
a.OpenTextFile "D:\Documents and Settings\nithya.s\Desktop\Medius.txt", ForWriting, True
Dim b As TextStream
Set b = a.OpenTextFile("D:\Documents and Settings\nithya.s\Desktop\Medius.txt", ForWriting, True)
b.WriteLine "Nithya,324,Raman,330,Sai,314,Raja,357,Balaji,349,Anand,336,Sasirekha,335,Shivakumar,751,Senthil,733,Sampath,735,Kalyani,395,Ganesh,313,Mahu,304,Thiru,303,Zuhaib,339"
b.Close
a.OpenTextFile "D:\Documents and Settings\nithya.s\Desktop\Medius.txt"
Set b = a.OpenTextFile("D:\Documents and Settings\nithya.s\Desktop\Medius.txt", ForReading, True)
Text1.Text = b.ReadLine
End Sub
I used the above code to create a text document with data separated by comma. Name & Num.
I want to create a table in DB with 2 columns name & num, and enter these values into the table, using VB6
plz help... Thanks in advance..