A beginers problem

nigel_rennie

New member
Joined
Jan 24, 2005
Messages
1
Programming Experience
Beginner
As part of a web service i want to have a function that can be initiated by a client. It should then update a database table i already have with data from a text file.

I am completly stuck with this and must be missing something fundimental.

<WebMethod()>​
Public Function NewData(ByVal FileLocation As String) As String

Dim Name, Address, Number As String

Dim MyFile As IO.StringReader

Dim FileLine As String

Dim Text As String

If IO.File.Exists(FileLocation) Then

Dim ReadFile As IO.StreamReader

ReadFile =
New IO.StreamReader(FileLocation)

FileLine = ReadFile.ReadLine()

Do Until FileLine = Nothing

Dim Parts As String()

Parts = FileLine.Split(ControlChars.Tab)

Name = (Parts(0))

Address = (Parts(1))

Number = (Parts(2))

WalkThrough11.MyTable.AddMyTableRow(Name, Address, Number)

FileLine = ReadFile.ReadLine()

Loop

ReadFile.Close()



End If

End Function

There is no doubt in my mind i am making a fool of myself but it has gotten to the point where i just need an answer to this problem so that i can learn from it and get on with my project.

Thanks in advance
Nigel
 
Back
Top