Help with CSV files

Where to start..haha.

My boss has me dev-ing a search page that will read from a CSV file.

It has to be in ASP (and the old one - not .NET) and we cant use a
real database -- trust me, I asked. So we are stuck with a CVS file
that I want to use as a data source that I can run SQL queries
against.

So...how?

Really, starting from scratch -- how. Like, how do I connect the CSV
file, do I need to define it? I read about a "Microsoft Text Driver"
and I copied some code and recieve an error "Object needed on line x"
which translates to "I have no idea if "oConn.Open" is a pre-defined
function/object or if I need to create the object first. Then, once
its connected, can I simply run a query against it like it was a db?

So, if one of you could be so kind to explain, step by step how to do
this it would be GREATLY appreciated!
lejason [ Mo, 26 Februar 2007 20:59 ] [ ID #1640630 ]

Re: Help with CSV files

<lejason [at] gmail.com> wrote in message
news:1172519966.452585.281170 [at] a75g2000cwd.googlegroups.com.. .
> Where to start..haha.
>
> My boss has me dev-ing a search page that will read from a CSV file.
>
> It has to be in ASP (and the old one - not .NET) and we cant use a
> real database -- trust me, I asked. So we are stuck with a CVS file
> that I want to use as a data source that I can run SQL queries
> against.
>
> So...how?
>
> Really, starting from scratch -- how. Like, how do I connect the CSV
> file, do I need to define it? I read about a "Microsoft Text Driver"
> and I copied some code and recieve an error "Object needed on line x"
> which translates to "I have no idea if "oConn.Open" is a pre-defined
> function/object or if I need to create the object first. Then, once
> its connected, can I simply run a query against it like it was a db?
>
> So, if one of you could be so kind to explain, step by step how to do
> this it would be GREATLY appreciated!
>

The Jet 4.0 driver will connect you to a csv file, which you would use just
like you were connecting to Access. Although I've never done it, I have
seen samples of standard SQL being used to query csv files.

If it makes you feel more comfortable, there's no reason why you can't use
DDL to create an mdb file on the server, import the csv and work with the
mdb instead.

--
Mike Brind
Mike Brind [ Mo, 26 Februar 2007 21:45 ] [ ID #1640631 ]
Webserver » microsoft.public.inetserver.asp.db » Help with CSV files

Vorheriges Thema: ehpism pcnhezk
Nächstes Thema: IIS Closes Connection For Certain ASP Pages