Re: Invalid Characters (\0s) Returned by OracleDataReader
From: Nick Malik [Microsoft] (nickmalik_at_hotmail.nospam.com)
Date: 01/10/05
- Next message: Marcin Grzębski: "Re: Problem with properties"
- Previous message: Joakim Karlsson: "Re: create an event handler for control array in C#"
- In reply to: RobertoP: "Invalid Characters (\0s) Returned by OracleDataReader"
- Next in thread: Brian Brown: "Re: Invalid Characters (\0s) Returned by OracleDataReader"
- Reply: Brian Brown: "Re: Invalid Characters (\0s) Returned by OracleDataReader"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 Jan 2005 06:47:23 -0800
four nearly identical posts in twenty minutes. That has to be some kind of
record.
Can you post a short but complete code segment that illustrates the problem?
The code you have looks fine.
The fact that the dataadapter returns the same things is concerning, because
very little of your code would have been involved.
that would point to either a defect or a configuration problem in either
your Oracle driver or the way the application is using .Net.
I'm still hoping we can find it in the code... that's why I've asked for
something a little more complete. Note: I don't have Oracle to test
against, so I'm hoping to help you spot it in the code.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"RobertoP" <RobertoP@discussions.microsoft.com> wrote in message
news:667E1A67-64E0-4EDD-B8B3-9120C4E622A2@microsoft.com...
> 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
- Next message: Marcin Grzębski: "Re: Problem with properties"
- Previous message: Joakim Karlsson: "Re: create an event handler for control array in C#"
- In reply to: RobertoP: "Invalid Characters (\0s) Returned by OracleDataReader"
- Next in thread: Brian Brown: "Re: Invalid Characters (\0s) Returned by OracleDataReader"
- Reply: Brian Brown: "Re: Invalid Characters (\0s) Returned by OracleDataReader"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|