Hello All Oz users,
I'm new to Oz and try to access an Oracle database with Oz.
There is a ODBC solution with tclodbc, I try it on Windows, it works, but
when there is an Oracle error, the thread doesn't exit from "{DSO
sqlReturn(...)"
So, this doesn't seem to be a real usable solution.
Here is the test code I use :
local
DSN = oracle_test
[TclODBC] = {Module.link ['tclodbc.ozf']}
DSO = {New TclODBC.odbc init}
in
{DSO connect(name:DSN)}
{Show 'Connected'}
try
{Show {DSO sqlReturn(DSN o(select '*' 'from' 'no_table') $)}}
catch _ then
{Show 'Errror :'}
end
{Show 'Next step .....'}
{DSO disconnect(DSN)}
{DSO forget}
end
And the output from the Emulator :
Mozart Engine 1.2.5 (20030214) playing Oz 3
'Connected'
Tk Module: --- ozr [oracle_test {select * from no_table}]
--- S0002 942 {[Oracle][ODBC][Ora]ORA-00942: table or view does not exist
}
---Is it the only solution today to access a Oracle Database with Oz ? Does someone know how to handle errors ? Does it work better under Linux ?
I saw that someone wrote and library to use Oracle OCI, but this was not contributed.
Are there others solutions ?
Thanks in advance for nay help.
Alain - Please send submissions to users@mozart-oz.org and administriva mail to users-request@mozart-oz.org. The Mozart Oz web site is at http://www.mozart-oz.org/. Please send bug reports to bugs@mozart-oz.org.