Problem with Devart 7.7.226.0

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
sathish
Posts: 3
Joined: Wed 05 Jun 2013 12:36
Location: India

Problem with Devart 7.7.226.0

Post by sathish » Wed 05 Jun 2013 12:40

We've purchased devart 7.7.226.0 last month. When we trying to update char(1) column value as empty character('') via visual studio 2010 vb.net, the table's column has been wrongly updated the undefined symbol instead of null value.

Note: Previously we've version devart 5.0, due to the database migration from oracle 10g to 11g we've purchased this new devart version 7.7.226.0.

Operating system: windows server 2003
IIS: version 6.0
Database: Oracle 11g version 11.2.0
Frontend: Visual studio 2010 professional edition.

Can anyone share your suggestions?

Regards,
Sathish

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: Problem with Devart 7.7.226.0

Post by Pinturiccio » Thu 06 Jun 2013 15:13

We could not reproduce the issue. Please send us a snippet of code with:
1. OracleConnection creation (roughly, without credentials);
2. OracleCommand creation for an insert or update statement;
3. Parameters creation, if they are used in your OracleCommand.

Please also send us the DDL script for creating your test table. A test project would be helpful.

sathish
Posts: 3
Joined: Wed 05 Jun 2013 12:36
Location: India

Re: Problem with Devart 7.7.226.0

Post by sathish » Fri 07 Jun 2013 06:12

Thanks for your reply, I've send my sample project which is a Visual studio 2010 vb.net solution to support at devart dot com . And also the backend scripts for OracleConnection (without credentials), OracleCommand and Parameters are attached as sql and text files in the same folder itself.

Kindly look into this issue and revert.

Thanks & Regards,
Sathish.J | Software Engineer

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: Problem with Devart 7.7.226.0

Post by Pinturiccio » Mon 10 Jun 2013 14:46

We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.
As a temporary workaround, replace the following line in your code:

Code: Select all

Dim flag As Char = txtflag.Text.ToString()
with this one:

Code: Select all

Dim flag As String = txtflag.Text.ToString()

sathish
Posts: 3
Joined: Wed 05 Jun 2013 12:36
Location: India

Re: Problem with Devart 7.7.226.0

Post by sathish » Tue 11 Jun 2013 04:06

Thanks, Yes we've already implemented that workaround in our system and its working fine. We're looking forward your solution.

Regards,
Sathish.J

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: Problem with Devart 7.7.226.0

Post by Pinturiccio » Tue 11 Jun 2013 14:30

The described behavior is designed. System.Char type in .NET Framework cannot contain empty values as opposed to the System.String type. An uninitialized variable of the System.Char type stores a character with the zero number.

In Oracle the CHAR(1) type can store a character with the zero number. Then the following query:

Code: Select all

SELECT * FROM devtest WHERE flag IS not null
will not return the required records, but the following query:

Code: Select all

SELECT * FROM devtest WHERE flag = CHR(00)
will return the required records.

In Visual Basic, conversion from the System.String to the System.Char type is performed implicitly, without any validations. If you perform an explicit conversion of an empty string to the System.Char type, you will get an exception:

Code: Select all

Dim flag as Char = Char.Parse(stringVariable) 'If stringVariable is empty string ("") then the exception will be thrown

Post Reply