Re: Standard Database Interface?
- From: "thelfter@xxxxxxxxx" <thelfter@xxxxxxxxx>
- Date: Mon, 22 Oct 2007 16:27:58 -0000
On Oct 20, 5:47 pm, Sean Woods <y...@xxxxxxxxxx> wrote:
On Oct 17, 2:34 am, tcltk...@xxxxxxx wrote:
Where can I find the examples on how to use taodbi? I need plenty of
examples because I'm not that smart. What databases are supported? Do
I need install packages for postgres, oracle and tclodbc?
Thanks.
You would need install packages for postgres, oracle, and tclodbc.
Taodbi
is a wrapper layer on top of the existing driver. Unfortunately, I
don't have
a wrapper at present for either postgres or Oracle. (Postgres is easy
enough to
come by, but a live Oracle system is a teensy bit more of a pain to
set up to
test.)
Once you have a wrapper though it would simply be
package require taodbi-connectors
tao::object_create myDbObject [list class theDriverClass ...
(connection info)...]
myDbObject query_flat "select field1,field2 from someTable where
field3='somevalue'"
(List returned)
myDbObject cmnd "update someTable set field1='newValue' where
primary_key='someKey'"
There are some more complicated examples for when you want the object
to generate
the query for you, but essentially the point of TaoDbi is to make it
damn simple
to string up a database.
quote <but a live Oracle system is a teensy bit more of a pain to set
up>
Note much of a pain at all. Oracle XE (free) is an RPM setup on Linux
and is an installable executable on windows.
OraTcl works just fine with Oracle XE.
When the community adopts a common DB API. I will write wrappers to
OraTcl to make it work.
-Todd
.
- Follow-Ups:
- Re: Standard Database Interface?
- From: Sean Woods
- Re: Standard Database Interface?
- References:
- Standard Database Interface?
- From: tcltkdev
- Re: Standard Database Interface?
- From: Sean Woods
- Re: Standard Database Interface?
- From: tcltkdev
- Re: Standard Database Interface?
- From: Sean Woods
- Standard Database Interface?
- Prev by Date: why upvar is a sledgehammer (was: Re: Call by Reference)
- Next by Date: Re: Call by Reference
- Previous by thread: Re: Standard Database Interface?
- Next by thread: Re: Standard Database Interface?
- Index(es):
Relevant Pages
|