LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW + Oracle Objects for OLE (OO4O)

Hi all,

I just wanted to share a problem with the newsgroup and see if anyone
has come across it before.

We are working on a LabVIEW application that talks to an oracle
database. Because it is a requirement that we work with oracle objects
(not just textbook SQL statements), we have decided to use oo4o
(Oracle Objects for OLE). This is a bunch of activeX controls from
Oracle that can work very efficiently with oracle databases.
Typically, these controls are used from within VB applications.

To make a long development story short, we have a working
application-- we can send and receive data from the database very
efficiently and everything works fine except when the application
exits. Then, on the way out it crashes with a LabVIEW.exe application
error: "The instruction at "0X000000" referenced memory at "0x000000".
The memory could not be read."

In the development environment this crash occurs NOT when the vi is
done executing but upon exiting LabVIEW itself. In the built
executable this crash occurs after the *.exe panel has left the
desktop upon quitting.

I am beating my head against the wall with this crash-- although it
does not affect the operation of the application, it looks really bad
to crash every time an application exits.

The only thing that I see that could explain it is that the oo4o
activeX control does not have a "close" method for the oradatabase
object-- in the oo4o docs it says something about the ordatabase
object being destroyed automatically when it goes "out of scope" in
VB. I'm not sure how this translates to LabVIEW. On the database
server side a connection exists until the application crashes.

Anyways, here are my questions:

1) Has anyone had success with using oo4o from LabVIEW? If so, did you
see anything like this?

2) I am pretty sure I closed all the activeX refs that I opened. Is
there anything else that could be the culprit?

3) What does it mean to destroy an activeX object when it goes out of
scope in VB and how can the same thing be done in LabVIEW?


Thanks for any info,
-H.
0 Kudos
Message 1 of 5
(3,069 Views)
Do you have a simple example VI you can send me that I can use to duplicate the problem? I've not tried communicating through OO4O myself, but I could certainly take a look at it and hopefully get to the bottom of the error.

Crystal
0 Kudos
Message 2 of 5
(3,069 Views)
Hi,

This sounds like not all references are closed properly. I think LV keeps
track of open references somehow during development, but not at run time
(I'm not sure).

Are all the opened references closed? Even if there is, let's say, a
property 'nodes', this reference need to be closed. These references are not
closed when the parent is closed. For loops might be tricky, references are
sometimes not passes through a for loop if N=0 (put the reference in a shift
register helps).

Regards,

Wiebe.

"H" wrote in message
news:a719e44.0310291501.bc50832@posting.google.com...
> Hi all,
>
> I just wanted to share a problem with the newsgroup and see if anyone
> has come across it before.
>
> We are working on a LabVIEW application that talks to an oracle
> database. Because it is a requirement that we work with oracle objects
> (not just textbook SQL statements), we have decided to use oo4o
> (Oracle Objects for OLE). This is a bunch of activeX controls from
> Oracle that can work very efficiently with oracle databases.
> Typically, these controls are used from within VB applications.
>
> To make a long development story short, we have a working
> application-- we can send and receive data from the database very
> efficiently and everything works fine except when the application
> exits. Then, on the way out it crashes with a LabVIEW.exe application
> error: "The instruction at "0X000000" referenced memory at "0x000000".
> The memory could not be read."
>
> In the development environment this crash occurs NOT when the vi is
> done executing but upon exiting LabVIEW itself. In the built
> executable this crash occurs after the *.exe panel has left the
> desktop upon quitting.
>
> I am beating my head against the wall with this crash-- although it
> does not affect the operation of the application, it looks really bad
> to crash every time an application exits.
>
> The only thing that I see that could explain it is that the oo4o
> activeX control does not have a "close" method for the oradatabase
> object-- in the oo4o docs it says something about the ordatabase
> object being destroyed automatically when it goes "out of scope" in
> VB. I'm not sure how this translates to LabVIEW. On the database
> server side a connection exists until the application crashes.
>
> Anyways, here are my questions:
>
> 1) Has anyone had success with using oo4o from LabVIEW? If so, did you
> see anything like this?
>
> 2) I am pretty sure I closed all the activeX refs that I opened. Is
> there anything else that could be the culprit?
>
> 3) What does it mean to destroy an activeX object when it goes out of
> scope in VB and how can the same thing be done in LabVIEW?
>
>
> Thanks for any info,
> -H.
0 Kudos
Message 3 of 5
(3,069 Views)
Crystal wrote in message news:<50650000000500000066330100-1066448259000@exchange.ni.com>...
> Do you have a simple example VI you can send me that I can use to
> duplicate the problem? I've not tried communicating through OO4O
> myself, but I could certainly take a look at it and hopefully get to
> the bottom of the error.
>
> Crystal

Hi Crystal,

Unfortunately, it requires that a connection is made to an oracle
database to reproduce the problem. So I can't make a simple example.

Any ideas are welcome, however.

Thanks,
-H.
0 Kudos
Message 4 of 5
(3,068 Views)
I've got Oracle 8i and 9i and variants in between and am my own DBA. So I can set up a table or two and play around with this. Also, just from a LabVIEW create and destroy refnum standpoint, seeing the diagram is extremely useful.
0 Kudos
Message 5 of 5
(3,068 Views)