Page 1 of 1

Problems with OracleCommandBuilder on mono

Posted: Tue 01 Sep 2009 11:34
by ddeml77
Hello,

I encountered problems with the OracleCommandBuilder on mono. Basically, it seems that the OracleCommandBuilder is not working at all with mono 2.0.1 running on Ubuntu 9.04 x86. On Windows 7 x64 Ultimate, everything runs fine.

You can find a sample project and the console output dumps here.

I always connected to the same Oracle XE 10g Server running on the Windows 7 x64 machine.

Can you reproduce the problems? If not, what do I wrong? If yes, can I expect a fix for this? If yes, when?

Thank you very much in advance for any help!

Greetings - Richie

Posted: Tue 01 Sep 2009 16:19
by ddeml77
I just checked and received the very same problems if I run the same executable on Ubuntu 9.04 x64 mono 2.0.1-4ubuntu0.1

Posted: Thu 03 Sep 2009 08:28
by Shalex
Thank you for the report. This is a known problem. Unfortunately, this problem is associated with the incorrect work of the base level in Mono. We cannot provide any timeframe. We are not sure that this problem can be resolved.

Posted: Wed 14 Oct 2009 13:32
by ddeml
Shalex, thanks for your answer. I intend to help fixing this issue in mono.

Do you know an already existing mono bug ticket addressing this issue?

Do you have any details about the cause of this error that would help me fixing this issue?

Thanks in advance for any help!

Greetings - RIchie

Posted: Thu 15 Oct 2009 15:20
by Shalex
Mono behaviour differs from Microsoft .NET one, which we expect to get.

We have overcome the following problems:
- Mono's CommandBuilder generates UpdateCommands with parameters, which have @ at the beginning;
- Mono doesn't store parameters with sourceColumnNullMapping=true in the parameters collection (Mono's bug);
- DbParameter.SourceColumnNullMapping is not supported at the base level at all;
- the event, which sets the CommandBuilder.DataAdapter property, doesn't arise.

There is no way to support these features:
- automatic work with the RowId column in DataAdapter;
- OracleCommandBuilder.UpdatingFields and OracleCommandBuilder.RefreshingFields are not supported;
- Dynamic SQL generation for the UpdateCommand against a SelectCommand that does not return any key column information is not supported.

Posted: Fri 16 Oct 2009 14:25
by ddeml
Thank you for this information. We are currently fixing this issue in mono. I'll inform you as soon as we got our use cases fixed.

Posted: Mon 26 Oct 2009 14:11
by atomulesei
Hello!

We've made some modifications related to the Mono sources related to the matters that you wrote above and managed to successfully run the test project under Ubuntu, however we got stuck with the following exception when running under AIX.

Code: Select all

Creating Connection...
Drop test table, if it already exists...
Creating table DDEML_TEST...
Creating test data...
Test case 1: Create UPDATE command with OracleCommand on a table that DOES NOT have a PK...
Creating INSERT command...
FAILED: System.Exception: NET: Unknown error 1
  at Devart.Data.Oracle.p.b (Int32 A_0) [0x00000] 
  at Devart.Data.Oracle.bm.c () [0x00000] 
  at Devart.Data.Oracle.t.a (Int32 A_0, a5 A_1) [0x00000] 
  at Devart.Data.Oracle.OracleCommand.InternalExecute (CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords) [0x00000] 
  at Devart.Common.DbCommandBase.ExecuteDbDataReader (CommandBehavior behavior) [0x00000] 
Creating PK PK_DDEML_TEST for table DDEML_TEST...
FATAL EXCEPTION: System.Exception: NET: Unknown error 1
  at Devart.Data.Oracle.p.b (Int32 A_0) [0x00000] 
  at Devart.Data.Oracle.p.a () [0x00000] 
  at xc.d.a (Byte A_0) [0x00000] 
  at xc.b.a (Byte A_0) [0x00000] 
  at xc.a.a () [0x00000] 
  at xc.e.a () [0x00000] 
  at Devart.Data.Oracle.d.a () [0x00000] 
  at Devart.Data.Oracle.t.a (Int32 A_0, a5 A_1) [0x00000] 
  at Devart.Data.Oracle.OracleCommand.InternalExecute (CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords) [0x00000] 
  at Devart.Common.DbCommandBase.ExecuteDbDataReader (CommandBehavior behavior) [0x00000] 
The test code we're using is virtually the same as the one in the zip of the first post.

We're using the Devart.Oracle.Data.dll version 5.25.48.0, and the test environment is a virtual node with two POWER 3,6GHz cores running AIX 6.1. The Mono framework is a custom build from a patched version 2.4.2.3

Note: the exception occurs with the original version of the Mono build as well, without our modifications.

Thank you and any ideas are greately appreciated.

Best regards,
Adic

Posted: Tue 27 Oct 2009 13:54
by Shalex
This is the way Mono works on the base level when generating a query. This is a known issue. Mono implementation differs from the Microsoft .NET one.

Posted: Tue 27 Oct 2009 15:04
by atomulesei
Yes, we're aware of that, and as stated at the beginning of the thread we intend to improve upon Mono code and make Oracle component run on Mono... However in this particular case it is hard to pinpoint the problem in the Mono code if we can't debug or analyze what went wrong in the query generation from Devart's point of view.

I think it is beneficial for both parties if we could analyze the problem in detail.

Running Oracle with Mono on both Ubuntu and AIX it is crucial for us, so if we won't be able to find a solution for this with Devart, we'll have to seek other components which can support us in achieving this goal.

Posted: Thu 29 Oct 2009 14:12
by Shalex
The problem is in an implementation of the DbCommandBuilder.CreateUpdateCommand method. This method creates SQL for InsertCommand basing on the information from SchemaTable.