Re-read an imported file?
On 5/15/05, Bill Gilligan <[email protected]> wrote:
> Ihi Ivo,
> I agree.
> But in this case, I have a text file that has 3 parts to it. It is not st=
raight data, but rather a
> mish mash of info I have to parse.
>=20
> Parts 1 and 2 are descriptions.
> Part 3 is additional info that must be combined with each of 1 and 2.
>=20
> The total size of each file is approx 4k. Its parsed, then deleted.
>=20
> Storing in a database is redundant, as the final info is stored in a data=
base (as two records).
>=20
> A variable - that could work. I wonder if importing a 4k file twice is mo=
re overhead than storing 4k
> of info in a variable and taking out whats needed with a token or.. ?
Simple question of memory vs. speed. At 4k, I'd go the variable
route. You could also build an array as you import, as that may make
it easier to parse through on a line by line basis.
> Bill
>=20
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> Bill Gilligan
> Gilligan On-Line
> www.gilliganonline.com
> 850-233-8775
>=20
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Ivo Truxa
> > Sent: Sunday, May 15, 2005 4:46 PM
> > To: 'Miva Users'
> > Subject: RE: [meu] Re-read an imported file?
> >
> > Well, better question would be whether it makes any sense. Repeating
> > MvIMPORT is certainly no problem, but it is rather
> > inefficient and slow. I
> > cannot imagine any reason for importing the same file in the
> > same scrip more
> > than once.
> >
> > I'd tell that better would be parsing the needed information
> > from the file
> > in a single pass, or storing the MvImported file into a
> > variable, or into a
> > database. Instead of the slow MvImporting it again, you would
> > then only
> > parse the data already available in the variable (or database)
> >
> > Ivo
> > http://mivo.truxoft.com
> >
> >
> > -----Original Message-----
> > From: Bill Gilligan
> >
> > Just an FYI - yes, it can be done.
> > Good ol' MvWhile.
> >
> > Bill
> >
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
> > Bill Gilligan
> > Gilligan On-Line
> > www.gilliganonline.com
> > 850-233-8775
> >
> > > -----Original Message-----
> > > From: [email protected]
> > > [mailto:[email protected]] On Behalf Of
> > Bill Gilligan
> > > Sent: Sunday, May 15, 2005 2:21 PM
> > > To: Miva Users
> > > Subject: [meu] Re-read an imported file?
> > >
> > > Is it possible to read an imported file, then relaod it to
> > > read again (a different section)?
> > >
> > > Bill
> >
> >
Announcement
Collapse
No announcement yet.
Re-read an imported file?
Collapse
X
-
Guest replied
-
Guest started a topic Re-read an imported file?Re-read an imported file?
Well, better question would be whether it makes any sense. Repeating
MvIMPORT is certainly no problem, but it is rather inefficient and slow. I
cannot imagine any reason for importing the same file in the same scrip more
than once.
I'd tell that better would be parsing the needed information from the file
in a single pass, or storing the MvImported file into a variable, or into a
database. Instead of the slow MvImporting it again, you would then only
parse the data already available in the variable (or database)
Ivo
http://mivo.truxoft.com
-----Original Message-----
From: Bill Gilligan
Just an FYI - yes, it can be done.
Good ol' MvWhile.
Bill
=============================
Bill Gilligan
Gilligan On-Line
www.gilliganonline.com
850-233-8775
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Bill Gilligan
> Sent: Sunday, May 15, 2005 2:21 PM
> To: Miva Users
> Subject: [meu] Re-read an imported file?
>
> Is it possible to read an imported file, then relaod it to
> read again (a different section)?
>
> Bill
Tags: None
Leave a comment: