G
Guest
Hello all,
I am trying to create an simple application that communicates with an Oracle
DB, but the data returned by the OracleDataReader object contains random
invalid characters.
To be more Specific, it replaces some characters with a '\0'
Example: Where it should be NIC it returns sometimes N\0\0
This is what I am using in my code:
//////
this.DWConnection.Open();
OracleCommand oraCMD = new OracleCommand("Select * from myTable where
(wname = 'F18104854')", this.DWConnection);
OracleDataReader myResultsReader = oraCMD.ExecuteReader();
while(myResultsReader.Read())
{
myResultsReader.GetValues(values);
}
this.DWConnection.Close();
//////
Some things I tried:
*I checked the variable "values" above, and many rows, not always the same
column, has \0 instead of characters. What is interesting is that it has the
same number of \0s as the actual characters in Oracle. Also, it is always in
the end of the string, and the first characters are read correctly.
Ex.: N\0\0 instead of NIC, 18852\0\0\0\0\0 instead of 188524C-01
*Seems not to have any pattern to when it replaces the characters with \0s
sometimes it is every other 2 rows, or every other 3, and so on.
*I tried the same code using OracleAdapter, and same results
*Using the server explorer, or the query builder tool, and the option to
view data at development time works just fine.
Any Ideas?
Thanks,
RobertoP
I am trying to create an simple application that communicates with an Oracle
DB, but the data returned by the OracleDataReader object contains random
invalid characters.
To be more Specific, it replaces some characters with a '\0'
Example: Where it should be NIC it returns sometimes N\0\0
This is what I am using in my code:
//////
this.DWConnection.Open();
OracleCommand oraCMD = new OracleCommand("Select * from myTable where
(wname = 'F18104854')", this.DWConnection);
OracleDataReader myResultsReader = oraCMD.ExecuteReader();
while(myResultsReader.Read())
{
myResultsReader.GetValues(values);
}
this.DWConnection.Close();
//////
Some things I tried:
*I checked the variable "values" above, and many rows, not always the same
column, has \0 instead of characters. What is interesting is that it has the
same number of \0s as the actual characters in Oracle. Also, it is always in
the end of the string, and the first characters are read correctly.
Ex.: N\0\0 instead of NIC, 18852\0\0\0\0\0 instead of 188524C-01
*Seems not to have any pattern to when it replaces the characters with \0s
sometimes it is every other 2 rows, or every other 3, and so on.
*I tried the same code using OracleAdapter, and same results
*Using the server explorer, or the query builder tool, and the option to
view data at development time works just fine.
Any Ideas?
Thanks,
RobertoP