Page 1 of 1

Problem with AssignConnect and Oracle.Direct *** UPDATE ***

Posted: Sat 12 Jun 2010 17:54
by invent
Hi,

I just tried the example-code in UniDac\Demos\Miscellaneous\Dll. I want to give an existing UniConnection from my Exe to the DLL.

The code works fine with InterBase and Oracle (with Client).

Than I set the specific option Oracle.Direct=True and AssignConnect failed.

I tried this with Delphi 7, Oracle 8, InterBase 2007 and UniDac Prof 2.70.0.9.

Do you have an idea what's going wrong?

Thanks in advance for any information.

Kind regards,
Gerd Brinkmann
invent GmbH

Posted: Mon 14 Jun 2010 09:38
by bork
Hello

Thank you for the information. We have reproduced your issue. We will notify you as soon as we have any result.

Posted: Tue 06 Jul 2010 17:46
by invent
Hi,

yesterday I installed UniDac 3.00.0.10 instead of 2.70.0.9 and today I have massive problems with Oracle direct mode! On every PC in our company the software crashes.

I made a try .. except in my code:

try
MyUniConnection.AssignConnect (ExterneConnection);
except
MyUniConnection.Connect;
end;

This works fine with UniDAC 2.70.0.9. With Interbase and Oracle (with Client) AssignConnect is successful and in Oracle direct mode I got a new connection in the Except-case.

I made this, because I hoped for a quick solution from Devart. Then I have not to change the code.

With UniDAC 3.00.0.10 the software crashes. Access-violation, invalid pointer-operations, the exe finished without messages or the UniConnection in the exe is invalid.

What can I do? I don't want to install Oracle clients. And I don't want to go back to UniDAC 2.70.0.9.

Kind regards,
Gerd Brinkmann
invent GmbH

Posted: Wed 07 Jul 2010 14:14
by bork
Hello

The cause of all errors that you see is assigning connection incorrectly. It can happen if new connection is located in DLL. This error is fixed and this fix will be included in the next ODAC build.

Posted: Wed 07 Jul 2010 15:38
by invent
Hi bork,

thanks for your reply. I hoped, that this error was fixed in Unidac 3.00.0.10, so i installed it. The problem was, that now there are more errors than in Uniac 2.7.

Okay, I'll be patient. In the meantime I removed all AssignConnects.

But now there is another problem: Without using AssignConnect UniDac makes in the DLL a new connection and this takes a little while. The User, who see no effect of pushing a button, pushes the button again and gets an Access Violation. Maybe it's critical to start two UniConnections in the same moment.

Kind regards,
Gerd Brinkmann
invent GmbH

Posted: Thu 08 Jul 2010 11:16
by bork
Hi

If you use DLL then calling AssignConnect is a correct way. The error that you found can occur if assigning direct connection only and if assigning this connection to DLL (assigning inside the same application works correctly).

If you bought UniDAC with source code then we can send you the fixed unit right now.

Posted: Mon 12 Jul 2010 13:42
by bork
Hello

Also you can temporary modify your code and add calling InitNet and InitOCI (this modification fixes the error with assign connection until new ODAC build is released):

begin
InitNet;
InitOCI;
OraSession.AssignConnect(ExternalSession);
end;

To call the InitNet procedure you should add the OraNet unit to the USES section.

In the new ODAC build the calling of InitNet and InitOCI will be added to the AssignConnect method.

Posted: Mon 19 Jul 2010 15:49
by bork
Hello

We have reproduced this problem and fixed it. This fix will be included in the next ODAC build.

Posted: Fri 23 Jul 2010 14:43
by invent
Hi bork,

sorry about the late reply. I made some days holyday.

Do you know Murphy's law? I bought UniDac with source until this summer. But there was no need to use the source, so I renewed the subscription without source.

But it doesn't matters, i can wait until the next update.

One short question: You wrote "This fix will be included in the next ODAC build." Does this mean, that the next UNIDAC build is fixed too?

Kind regards,
Gerd Brinkmann
invent GmbH

Posted: Fri 23 Jul 2010 16:14
by bork
Hello

Yes, this fix will be included in next UniDAC build as well.