473,394 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Invalid Characters randomly returned by OracleDataReader

Hello,

I am trying to create a simple Oracle application that queries some data
from Oracle. The problem is that it randomly returns trailing \0s instead of
the characters of a string.

Instead of:
NIC, returns sometimes as N\0\0
188524C-01, returns somtimes as 18852\0\0\0\0\0

Notice that length of the strings are the same, just some characters in the
end was replaced with \0s

this is my code:

\\\\\\\

this.DWConnection.Open();

OracleCommand oraCMD = new OracleCommand("Select * from table_v where (wname
= 'F18104854')" , this.DWConnection);

OracleDataReader myResultsReader = oraCMD.ExecuteReader();
while(myResultsReader.Read())
{
myResultsReader.GetValues(values);
}

this.DWConnection.Close();

Some Notes:
*It returns the correct number of records
*The problem seems to appear on String columns only
*The same column contains good and bad values
*Data Adapter causes the same problem
*Viewing data using the Query Builder tool, and Server Explorer works
*View data using the adapter at development time does NOT work

It may be something very silly I am missing...

Thanks,

--
RobertoP
Nov 16 '05 #1
0 1103

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JM | last post by:
Is there a way to load a DataGrid using an OracleClient.OracleDataReader? I've seen code where a SqlDataReader is used, but I get an error when trying to use an OracleDataReader.
7
by: RobertoP | last post by:
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...
0
by: RobertoP | last post by:
Hello, I am trying to create a simple Oracle application that queries some data from Oracle. The problem is that it randomly returns trailing \0s instead of the characters of a string. ...
0
by: RobertoP | last post by:
Hello, I am trying to create a simple Oracle application that queries some data from Oracle. The problem is that it randomly returns trailing \0s instead of the characters of a string. ...
0
by: phil | last post by:
I'm having the same problem. Basically, what I need to know is - Can I move more than 4000 characters from a TextBox in a Web Form to a string? If so, some code that illustrates how to do this...
3
by: brian | last post by:
Hello, Can someone tell me how I can randomly assign a file to a variable from a directory. Example: Dim File as string I need to search through 'C:/Comics/' and have the program randomly...
3
by: divsTiw | last post by:
I want to populate combo box with data from OracleDataReader , but "Invalid attempt to read when no data is present." is thrown. there are two rows returned , then too why such error. plzzz...
9
by: AG | last post by:
I occassionally get the following exception from an ASP.NET 2.0 Web Application running on a shared web host. I have no way of knowing what the actual request page was as it never happens when I...
4
by: Miha V | last post by:
Hi! We are using ASMX web service with WSE (we're using WS-Addressing) and IIS returns HTTP status code 200 even if XML is malformed (it can contain illegal characters in it). The request...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.