Re: Standard Database Interface?



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

.



Relevant Pages

  • Re: How do I export a environmental variable to a C program?
    ... I am writing a function for postgres in C which connect to Oracle ... can't do that (at least with no shell I ever heard of). ... parent process. ...
    (comp.lang.c)
  • Re: Is a database suitable for this project?
    ... statement after seeing it repeatedly fail to offer consistent filtering on ... I have not used Oracle 10g yet. ... I am working with Postgres more these days than with Oracle (we ... Yes, I like Firebird too. ...
    (borland.public.delphi.non-technical)
  • Re: Standard Database Interface?
    ... You would need install packages for postgres, oracle, and tclodbc. ...
    (comp.lang.tcl)
  • Re: Why is SUN falling so far behind IBM?
    ... > the PerlDBI interface to Postgres was lacking. ... > already have an Oracle wizard around to make your installation act ... We've had our fair share of problems porting ... was needed to get around what was alleged to be a fundamental lack in ...
    (comp.unix.aix)
  • Re: How do I export a environmental variable to a C program?
    ... I am writing a function for postgres in C which connect to Oracle ... postgres accepts a shared object to be loaded. ... Top-posting has lost all connection to previous traffic in this ...
    (comp.lang.c)