Help with CSV files

Help with CSV files

am 26.02.2007 20:59:26 von lejason

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!

Re: Help with CSV files

am 26.02.2007 21:45:45 von Mike Brind

wrote in message
news:1172519966.452585.281170@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