Problem with AssignConnect and Oracle.Direct *** UPDATE ***
Problem with AssignConnect and Oracle.Direct *** UPDATE ***
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
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
Last edited by invent on Tue 06 Jul 2010 17:48, edited 1 time in total.
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
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
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
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
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.
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.
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.
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.
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
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