Home All Groups Group Topic Archive Search About

Seek Method, is it the right thing to use?

Author
7 Apr 2006 1:19 AM
ataanis
I just realized the SEEK method has the same problem, from what I
understand, it sets the file pointer to the beginning of the file, and
can't be changed!!! I need a way to set the streamreader to a certain
place in the line, I already know the column number  , am I right that
seek is not the right thing to use here? I already tried read() and
doesn't work either.

thanks

Author
7 Apr 2006 4:06 AM
Cor Ligthert [MVP]
Ataanis,

There are more seeks, what seek do you mean.

http://search.msdn.microsoft.com/search/results.aspx?st=b&na=80&qu=seek&View=msdn

Cor

<ataa***@gmail.com> schreef in bericht
Show quoteHide quote
news:1144372752.924463.52030@z34g2000cwc.googlegroups.com...
>I just realized the SEEK method has the same problem, from what I
> understand, it sets the file pointer to the beginning of the file, and
> can't be changed!!! I need a way to set the streamreader to a certain
> place in the line, I already know the column number  , am I right that
> seek is not the right thing to use here? I already tried read() and
> doesn't work either.
>
> thanks
>
Author
7 Apr 2006 7:57 AM
ataanis
basically I need to be able to read from a specified location on the
line, can you tell me how to do that?
Author
7 Apr 2006 7:51 PM
james
You need to be more clear about what you are trying to do. Are you opening a
Database file like Access and trying to read some data? ( you mentioned in
your original post that you already had the "Column" ) Seek is usually
associated with opening a file and manually reading the raw data, usually
using a FileStream. It can be used with Binary files and a lot of others as
Cor mentioned.  As far as I know, there is no SEEK method for accessing a
database file.  How about an example of what you have done so far?
james

<ataa***@gmail.com> wrote in message
Show quoteHide quote
news:1144396664.347141.258810@e56g2000cwe.googlegroups.com...
> basically I need to be able to read from a specified location on the
> line, can you tell me how to do that?
>
Author
8 Apr 2006 9:46 PM
Homer J Simpson
<ataa***@gmail.com> wrote in message
news:1144372752.924463.52030@z34g2000cwc.googlegroups.com...
> I just realized the SEEK method has the same problem, from what I
> understand, it sets the file pointer to the beginning of the file, and
> can't be changed!!! I need a way to set the streamreader to a certain
> place in the line, I already know the column number  , am I right that
> seek is not the right thing to use here? I already tried read() and
> doesn't work either.

Usually Binary open lets you pick any bits you want from out of any file.
Haven't needed to try it with .Net so far.