Page 1 of 1

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

Posted: Wed 12 Jul 2006 09:16
by Guest
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

Posted: Thu 13 Jul 2006 10:33
by Alexey
The name of the product is OraDirect .NET data provider.
Please read "Licensing" topic of its help documentation.

Posted: Thu 13 Jul 2006 12:41
by Guest
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

Posted: Tue 18 Jul 2006 10:49
by Alexey
We are investigating this problem. You will be notified on results as soon as possible.

Posted: Tue 18 Jul 2006 14:45
by Alexey
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".

Posted: Wed 19 Jul 2006 07:41
by Guest
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

Posted: Wed 19 Jul 2006 08:14
by Alexey
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.

Posted: Wed 02 Aug 2006 16:15
by Guest
Hi,
Can you please tell me when the 'version with the fix' is expected?
(It is kind of urgent to us)
Thanks
Eitan

Posted: Thu 03 Aug 2006 11:58
by Alexey
We are going to make a build on Monday.

Posted: Tue 08 Aug 2006 07:45
by Guest
Hi,

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

Thanks
Eitan

Posted: Wed 16 Aug 2006 06:41
by Alexey
Sorry for delay. New build was available for download since 11th of August.