comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: database access using JAVA or COM
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: database access using JAVA or COM [message #49758] Tue, 15 August 2006 08:41 Go to next message
Mike Wallace is currently offline  Mike Wallace
Messages: 25
Registered: May 2006
Junior Member
Rick Towler wrote:
> Has anyone made any database connectivity tools publicly available? I
> know that Mike Wallace has done a lot of work with the IDL-Java bridge
> and JDBC but I don't think he has released anything. I have worked with
> the ADODB COM object and plan to experiment with it in IDL this
> afternoon but ideally someone will have already done this :)


Yes, I have played around with it quite a bit, but unfortunately I'm in
a situation where it's difficult for me to release code (too much red
tape and hassle). As far as COM goes, you're on your own. I've only
worked with the Java side.

-Mike
Re: database access using JAVA or COM [message #49765 is a reply to message #49758] Tue, 15 August 2006 06:33 Go to previous messageGo to next message
Paul[2] is currently offline  Paul[2]
Messages: 13
Registered: January 2006
Junior Member
Rick Towler wrote:
> Rick Towler wrote:
>> Has anyone made any database connectivity tools publicly available? I
>> know that Mike Wallace has done a lot of work with the IDL-Java bridge
>> and JDBC but I don't think he has released anything. I have worked with
>> the ADODB COM object and plan to experiment with it in IDL this
>> afternoon but ideally someone will have already done this :)
>
>
> An update:
>
> IDLcomIDispatch seems to still suffer from partialimplementationitus.
> Certain methods work and certain properties are accessible, but other
> properties and methods don't work and fail with unspecified errors.
>
>
> cstring='Provider=OraOLEDB.Oracle;Data Source=somedb;User ' + $
> 'Id=user;Password=pass'
> db = OBJ_NEW('IDLcomIDispatch$PROGID$ADODB_Connection')
> db -> SetProperty, ConnectionString=cstring
> db -> Open
> db -> GetProperty, Provider=p, State=s
>
> print, p
> OraOLEDB.Oracle.1
> print, s
> 1
>
> So far so good. I was thinking I was home free...
>
> rs = OBJ_NEW('IDLcomIDispatch$PROGID$ADODB_RecordSet')
> sql = 'Select * from ship'
> rs -> Open, sql, db
>
> % IDLCOMIDISPATCH$PROGID$ADODB_RECORDSET::OPEN: Unable to call method OPEN.
> <unknown system error>
>
> Humm. Here's the interface definition:
>
> [id(0x000003fe), helpcontext(0x0012c8d7)]
> void Open(
> [in, optional] VARIANT Source,
> [in, optional] VARIANT ActiveConnection,
> [in, optional, defaultvalue(-1)] CursorTypeEnum CursorType,
> [in, optional, defaultvalue(-1)] LockTypeEnum LockType,
> [in, optional, defaultvalue(-1)] long Options);
>
>
> O.K. How about something simpler:
>
> rs -> GetProperty, Status=s
>
> % IDLCOMIDISPATCH$PROGID$ADODB_RECORDSET::GETPROPERTY: Unable to access
> property STATUS.
> <unknown system error>
>
> The interface definition:
>
> [id(0x00000405), propget, helpcontext(0x0012c949)]
> long Status();
>
>
> Doesn't get much simpler than that.
>
>
> After writing a couple of wildly successful functions using COM+ADODB in
> MATLAB, I am left a bit underwhelmed with IDL's poor support for COM.
> I've been waiting for a working implementation of IDLcomIDispatch ever
> since it's release in 5.5. I must be the only one... :(
>
> -Rick

Hi Rick,

Is the ADODB a .exe, .dll or .ocx component? My guess is it's an
Application Object stored in a .exe. If so, I have a solution for you
(that will be included in the 6.4 distribution). GIve me a call and
I'll tell you more - 303-402-4679.

Thanks,
-Paul
Re: database access using JAVA or COM [message #49770 is a reply to message #49765] Mon, 14 August 2006 16:45 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Rick Towler wrote:
> Has anyone made any database connectivity tools publicly available? I
> know that Mike Wallace has done a lot of work with the IDL-Java bridge
> and JDBC but I don't think he has released anything. I have worked with
> the ADODB COM object and plan to experiment with it in IDL this
> afternoon but ideally someone will have already done this :)


An update:

IDLcomIDispatch seems to still suffer from partialimplementationitus.
Certain methods work and certain properties are accessible, but other
properties and methods don't work and fail with unspecified errors.


cstring='Provider=OraOLEDB.Oracle;Data Source=somedb;User ' + $
'Id=user;Password=pass'
db = OBJ_NEW('IDLcomIDispatch$PROGID$ADODB_Connection')
db -> SetProperty, ConnectionString=cstring
db -> Open
db -> GetProperty, Provider=p, State=s

print, p
OraOLEDB.Oracle.1
print, s
1

So far so good. I was thinking I was home free...

rs = OBJ_NEW('IDLcomIDispatch$PROGID$ADODB_RecordSet')
sql = 'Select * from ship'
rs -> Open, sql, db

% IDLCOMIDISPATCH$PROGID$ADODB_RECORDSET::OPEN: Unable to call method OPEN.
<unknown system error>

Humm. Here's the interface definition:

[id(0x000003fe), helpcontext(0x0012c8d7)]
void Open(
[in, optional] VARIANT Source,
[in, optional] VARIANT ActiveConnection,
[in, optional, defaultvalue(-1)] CursorTypeEnum CursorType,
[in, optional, defaultvalue(-1)] LockTypeEnum LockType,
[in, optional, defaultvalue(-1)] long Options);


O.K. How about something simpler:

rs -> GetProperty, Status=s

% IDLCOMIDISPATCH$PROGID$ADODB_RECORDSET::GETPROPERTY: Unable to access
property STATUS.
<unknown system error>

The interface definition:

[id(0x00000405), propget, helpcontext(0x0012c949)]
long Status();


Doesn't get much simpler than that.


After writing a couple of wildly successful functions using COM+ADODB in
MATLAB, I am left a bit underwhelmed with IDL's poor support for COM.
I've been waiting for a working implementation of IDLcomIDispatch ever
since it's release in 5.5. I must be the only one... :(

-Rick
Re: database access using JAVA or COM [message #50046 is a reply to message #49758] Sun, 03 September 2006 17:47 Go to previous message
rs.usenet is currently offline  rs.usenet
Messages: 1
Registered: September 2006
Junior Member
Hello,

I will be releasing such a tool at the ADASS conference
(http://www.adass.org/) next month. Here is the abstract that I have
submitted for a poster:

"We have developped a Java middleware to access relational databases
from IDL (Interactive Data Language by RSI, now ITT). Our middleware
combines the new Java-Bridge feature available in IDL from version 6.0
with the proven JDBC interface, drivers for which are available for all
relational databases from PostgreSQL and MySQL to Oracle and Sybase
etc. DataJiver simplifies access to these databases by providing the
developers with IDLs object that can dynamically map to the result set
from SQL statements, thus facilitating the developments of business
objects capable of hibernation."

In the meantime if you are interested to test the package, please drop
me an email.
---
Renaud Savalle <rs.usenet@gmail.com>
Research Engineer, CNRS, France

Mike Wallace wrote:
> Rick Towler wrote:
>> Has anyone made any database connectivity tools publicly available? I
>> know that Mike Wallace has done a lot of work with the IDL-Java bridge
>> and JDBC but I don't think he has released anything. I have worked with
>> the ADODB COM object and plan to experiment with it in IDL this
>> afternoon but ideally someone will have already done this :)
>
>
> Yes, I have played around with it quite a bit, but unfortunately I'm in
> a situation where it's difficult for me to release code (too much red
> tape and hassle). As far as COM goes, you're on your own. I've only
> worked with the Java side.
>
> -Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL system-defined variables
Next Topic: DXF and Face3D

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:05:08 PDT 2025

Total time taken to generate the page: 0.00598 seconds