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
Problem with Devart 7.7.226.0
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Problem with Devart 7.7.226.0
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.
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.
Re: Problem with Devart 7.7.226.0
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
Kindly look into this issue and revert.
Thanks & Regards,
Sathish.J | Software Engineer
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Problem with Devart 7.7.226.0
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:
with this one:
As a temporary workaround, replace the following line in your code:
Code: Select all
Dim flag As Char = txtflag.Text.ToString()
Code: Select all
Dim flag As String = txtflag.Text.ToString()
Re: Problem with Devart 7.7.226.0
Thanks, Yes we've already implemented that workaround in our system and its working fine. We're looking forward your solution.
Regards,
Sathish.J
Regards,
Sathish.J
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Problem with Devart 7.7.226.0
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:
will not return the required records, but the following query:
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:
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
Code: Select all
SELECT * FROM devtest WHERE flag = CHR(00)
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