cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl and ODBC?????

From: Tim Tassonis <timtas_at_cubic.ch>
Date: Wed, 21 Jan 2009 14:48:33 +0100

Hi All

Daniel Stenberg wrote:
> On Fri, 16 Jan 2009, stevekbox-one_at_yahoo.com wrote:
>
> I would claim that ODBC would be stretching libcurl way too much. Also,
> such a functionality wouldn't use much of libcurl's existing code but
> would only share entry point and the rest would need specific code. Not
> to mention that I'm not a database guy myself so I know exactly nothing
> about odbc beyond from what I can read on wikipedia.
>
> I also failed to find a defined URI/URL syntax for odbc.
>
> So no, to me it doesn't make much sense.

Well, in my opinion it makes as much sense as the ldap stuff, which is
also a database access protocol. Which of course opens up the question
how much sense the ldap stuff makes.....

As for the URL, I'd suggest something in the LDAP URL way:

odbc://user:pass_at_dsn/table?columns?conditions?sorting

As an example:

odbc://scott:tiger_at_empdb/emp?ename,deptno?(manager='10')?ename asc

Which would generate the following:

connect scott/tiger_at_empdb

select ename,deptno from emp where manager = '10' order by ename asc

Of course, joins, updates etc wouldn't be covered by this, just simple
queries on one table/views.

The question of the format of the returned data also remains, unlike
LDAP that has a standard output format in ldif, odbc defines no such
thing. CSV would probably be the natural choice.

I can well live without odbc in curl, but would welcome the addition and
could also provide help in implementing it, as I've done quite a lot of
odbc programming in c and know curl/libcurl quite well.

Just let me know.

Bye
Tim
Received on 2009-01-21