Is there an idiots guide to writing an ODBC driver?

  • Thread starter Ian Smith - IS Associates
  • Start date
I

Ian Smith - IS Associates

Morning

We will be receiving some data files on a regular basis, these files are in
a version of VSAM.

We want to load these into Access.

I want to write a minimum possible ODBC driver that supports SELECT * FROM
<FileName> In the same way that the Access text driver does. From here on
normal Access users will be able to cope, by loading the result into an
Access table.

I appreciate that it if were for distribution, file based odbc drivers have
to implement a whole SQL engine, but it wil be for internal use only so we
can be a bit naughty and only support what is needed and flag an error for
WHERE clauses, INSERTs etc!

We do have file format documentation and it may be easier to write a routine
to dump the files as text files and then load the text files but this is not
the prefered solution.

I am a very experienced c++/assembler programmer but I have never written an
ODBC driver.

Any ideas?

Thanks

Ian Smith
 
C

Chris Mills

You might want to ask in some related newsgroups, like C newsgroups, or some
other Access ng's like "externaldata". I think it's an unusual request.

For myself, and possibly most, imports via csv, xls, into Access tables is the
more usual route.

An ODBC driver is for manipulating some external data source directly (or so I
think, usually), whereas you just want to import(load is what you said). I
would think that is best served by indeed "loading it" (importing into Access,
rather than ODBC which does not actually load it but connects to it, with
possibly attendant speed problems)

For myself, if I wasn't sure what needed to be imported into (Access), then I
guess I'd import the data into a Temp Table, and use some queries to vet the
data from there into "main tables". In fact, I did such a thing just yesterday
(import csv data), and rather than mess-up the nice "Front-End" with "temp
tables", I just gave them a separate "front-end" mdb to be used on this
occasion (or several-who cares).

Anyway, it doesn't sound like the right newsgroup to discover how to write an
ODBC driver? Just for data imports?
Chris

"Ian Smith - IS Associates" <Ian Smith - IS
(e-mail address removed)> wrote in message
news:[email protected]...
 
I

Ian Smith - IS Associates

Morning

Thanks for this.

I ended up here as I tried the forum that suggets which forums to post to.

My main issue is that the files are supplied as VSAM files and we can not
get them as CSV files. We are being sent backup tapes, potentially 50 per
month with about 30 VSAM files per backup.

Just to be totally clear, I know no way of loading/importing a VSAM file
into Access.

So I either have to write a program to unload each VSAM file to a CSV file
and then import this file or write a stripped down ODBC driver so that this
conversion step can be avoided.

The ODBC driver is a more elegant solution.

I apppreciate that as a method of simply reading a whole file ODBC is
overkill/inappropriate, but it fits more neatly into the environment. People
know how to select an ODBC datasource in Access, they do it a lot against SQL
Server databases, so the concept is not strange.

Like you suggest I envisage these VSAM files being read into a temporary
table and the required information being moved into Access/SQL Server tables.

Bye

Ian
 
C

Chris Mills

Evening. (it's evening here!)

Yeah. The usual advice is to find some method (often by the other system) to
supply in some compatible transfer format (Access has as many as most).

To be perfectly frank, I don't recognise VSAM. Perhaps you could say what it
comes from, or in any case many people will be listening and might be able to
help further. Most systems can write some generally-recognised format, I mean
what if you wanted to convert to Paradox, an IBM 360, an Apple, or something?
CSV(text) format would be the bottom line.

I can't recall anyone "threatening"(-so to speak!), writing an ODBC driver
merely to import data. But let others speak!

Chris

PS (for anyone interested) see:
http://www.sunydutchess.edu/cis/vsam.htm#structure
or
http://www.sunydutchess.edu/cis/vsam.htm
or
http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/sg246105.html?Open

As far as I can tell from a quick perusal, IBM should provide some
standard-recognised external data format. I'm coloured by just finishing (last
night) a history of IBM and other players.

Can you confirm this is a proprietary IBM format. Or what?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top