Print Thread
oracle connection problem in 64 bit add-in
#64390 01/19/23 01:59 PM
Joined: Jan 2023
Posts: 6
A
Member
OP Offline
Member
A
Joined: Jan 2023
Posts: 6
Hello!

I would like to compile a 64-bit add-in for 64-bit word, but I have a problem with the oracle connection.
I created a small test program. I have a form with an oraclesession component.
When I compile a windows exe program from it, the oraclesession connects to the database without any problems.
It works in both 32 bit and 64 bit versions.
If I compile the same form into add-in dll and call it from a word, it works in 32 bit version,
but in 64 bit I get the following error message: Access violation at address 00007FFC035A31D3 in module 'OraClient.Dll'. Write of address 0000000000000018

try
mmoLog.Lines.Add('Start');

OracleSession.Connected := False;
OracleSession.LogonDatabase := FLogonDataBase;
OracleSession.LogonUsername := edtUser.Text;
OracleSession.LogonPassword := edtPassword.text;
mmoLog.Lines.Add('after dmDataMain.OracleSession.LogonDatabase := '+ FLogonDataBase);
OracleSession.Connected := True; // AV error in this row !
mmoLog.Lines.Add('after Connected: ' + BoolToStr(OracleSession.Connected, true));

except
on E: Exception do begin
mmoLog.Lines.Add('Connection failed!');
mmoLog.Lines.Add('FLogonDataBase:'+FLogonDataBase);
mmoLog.Lines.Add('Error:'+E.Message);
end;
end;

The operating system is windows 10, 64 bit. office is Office 365 64 bit. oracle cliens is also 64 bit.
I compiled with Delphi 10.3.

Have you encountered this problem? What is the solution?

Re: oracle connection problem in 64 bit add-in
Andras Boros #64392 01/20/23 10:08 AM
Joined: Aug 1999
Posts: 22,173
Member
Offline
Member
Joined: Aug 1999
Posts: 22,173
Are you using the latest 4.1.4 release for Delphi 10.3?


Marco Kalter
Allround Automations
Re: oracle connection problem in 64 bit add-in
Andras Boros #64393 01/20/23 04:37 PM
Joined: Jan 2023
Posts: 6
A
Member
OP Offline
Member
A
Joined: Jan 2023
Posts: 6
Yes we use this. 4.1.4 release for Delphi 10.3

Re: oracle connection problem in 64 bit add-in
Andras Boros #64394 01/23/23 08:57 AM
Joined: Aug 1999
Posts: 22,173
Member
Offline
Member
Joined: Aug 1999
Posts: 22,173
Do you have the source code option? If so, I will send you a test source file with a possible fix. If not, we will build a package with this possible fix.


Marco Kalter
Allround Automations
Re: oracle connection problem in 64 bit add-in
Marco Kalter #64395 01/23/23 09:23 AM
Joined: Jan 2023
Posts: 6
A
Member
OP Offline
Member
A
Joined: Jan 2023
Posts: 6
Yes, I have uploaded two test programs to dropbox. Both programs use the same form. The exe works, the addin does not. Here is the link: https://www.dropbox.com/s/1pvmx9ht7h89ykt/OracleConnectTest.zip?dl=0

Re: oracle connection problem in 64 bit add-in
Andras Boros #64396 01/23/23 10:21 AM
Joined: Aug 1999
Posts: 22,173
Member
Offline
Member
Joined: Aug 1999
Posts: 22,173
Sorry for the confusion. I meant to ask if your Direct Oracle Access license includes the source code option? In that case I can send you the fix as a source file.


Marco Kalter
Allround Automations
Re: oracle connection problem in 64 bit add-in
Andras Boros #64397 01/23/23 11:48 AM
Joined: Jan 2023
Posts: 6
A
Member
OP Offline
Member
A
Joined: Jan 2023
Posts: 6
OK. I see. Yes, our licence inludes the source code option.

Re: oracle connection problem in 64 bit add-in
Andras Boros #64398 01/23/23 12:42 PM
Joined: Aug 1999
Posts: 22,173
Member
Offline
Member
Joined: Aug 1999
Posts: 22,173
Okay. I have sent you an e-mail with the sources.


Marco Kalter
Allround Automations
Re: oracle connection problem in 64 bit add-in
Andras Boros #64399 01/23/23 01:26 PM
Joined: Jan 2023
Posts: 6
A
Member
OP Offline
Member
A
Joined: Jan 2023
Posts: 6
Great! It works! Thank you very much!


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.481s Queries: 15 (0.191s) Memory: 2.5327 MB (Peak: 3.0377 MB) Data Comp: Off Server Time: 2024-03-29 07:07:48 UTC
Valid HTML 5 and Valid CSS