Application freeze on DB command execution when .Net DLL is accessed from Delphi EXE.

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Guest

Application freeze on DB command execution when .Net DLL is accessed from Delphi EXE.

Post by Guest » Wed 12 Jul 2006 09:16

Hi,

The problem is that the application freeze when accessed from Delphi EXE. The application is a .Net DLL (VS2005). Its code is using ODAC for .Net version 3.50.11.0.
The .Net DLL is exposed through COM. The Delphi EXE is using COM to invoke the .Net DLL’s functionality.
When the .Net DLL is accessed using .Net EXE (not through COM) then all is well.

The freeze is on the line: reader = command.ExecuteReader();

What can be done to make it work when accessed from Delphi EXE?

Here is part of the code of the .Net class (packaged as DLL).
(The DLL is signed and COM-registered. The DLL is also registered in the GAC. A .Tlb file was produced and used by the Delphi EXE.)

[Guid("6510907A-F959-4517-B677-1FBC9F4603E2")]
[ComVisible(true)]
public class EntryPoint : IPSR_Excel
{
public void NewReport_1 ()
{
CoreLab.Oracle.OracleConnection conn = new CoreLab.Oracle.OracleConnection();
conn.ConnectionString = "User Id=;Password=;Server=;Direct=True;Sid=;";
conn.Open();

CoreLab.Oracle.OracleCommand command = new CoreLab.Oracle.OracleCommand();
command.CommandType = System.Data.CommandType.Text;
command.CommandText = "select sysdate from dual";
command.Connection = conn;

System.Windows.Forms.MessageBox.Show("Query Before");
CoreLab.Oracle.OracleDataReader reader;
reader = command.ExecuteReader();
System.Windows.Forms.MessageBox.Show("Query After");
if (reader.HasRows)
{ // there is a record.
reader.Read();
System.Windows.Forms.MessageBox.Show("Sysdate = " + reader.GetDateTime(0).ToString());
}

conn.Close();
}



Thanks
Eitan

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 13 Jul 2006 10:33

The name of the product is OraDirect .NET data provider.
Please read "Licensing" topic of its help documentation.

Guest

Post by Guest » Thu 13 Jul 2006 12:41

Hi,
Thanks for the response.
We are experimenting with the trial version.

I read the help page (ms-help://CoreLab.Oracle/OraDirect/Licensing.html).
Found/did the following:
1. The file licenses.licx already exists.
2. The file licenses.licx contains: CoreLab.Oracle.OracleConnection, CoreLab.Oracle, Version=3.50.11.0, Culture=neutral, PublicKeyToken=09af7300eec23701
3. The file licenses.licx is part of the dll project (under Properties) and its build action is “Embedded Resource”
4. Followed the instructions in section “Class Libraries Support”.

But the behavior is the same. The application freezes on the line: reader = command.ExecuteReader();

Eitan

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 18 Jul 2006 10:49

We are investigating this problem. You will be notified on results as soon as possible.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 18 Jul 2006 14:45

We tested your code. The program just finishes without any messages. This has been fixed. Look forward to the next build. We couldn't reproduce the "freezing".

Guest

Post by Guest » Wed 19 Jul 2006 07:41

Hi,

Thank you.
Please clarify if the “The application just finished without any messages” means that the application crashed and disappeared (instead of freeze) or did you see the two debug messages before and after the line that freeze.

In the optimistic case – when is the next build due?

Eitan

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 19 Jul 2006 08:14

Yes, you got me right, it crashes and dissappears after first debug message.
New build should be available in two weeks.
Thank you for your patience.

Guest

Post by Guest » Wed 02 Aug 2006 16:15

Hi,
Can you please tell me when the 'version with the fix' is expected?
(It is kind of urgent to us)
Thanks
Eitan

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 03 Aug 2006 11:58

We are going to make a build on Monday.

Guest

Post by Guest » Tue 08 Aug 2006 07:45

Hi,

I cannot find a download newer than v3.50 (trial).
Please advise.

Thanks
Eitan

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 16 Aug 2006 06:41

Sorry for delay. New build was available for download since 11th of August.

Post Reply