Click here to Skip to main content
15,923,689 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: OracleDataReader GetChars method only buffering half the characters Pin
Eddy Vluggen22-Jul-15 23:33
professionalEddy Vluggen22-Jul-15 23:33 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Aaron Rosenthal23-Jul-15 2:03
Aaron Rosenthal23-Jul-15 2:03 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Eddy Vluggen23-Jul-15 2:13
professionalEddy Vluggen23-Jul-15 2:13 
AnswerRe: OracleDataReader GetChars method only buffering half the characters Pin
Richard Deeming23-Jul-15 2:20
mveRichard Deeming23-Jul-15 2:20 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Aaron Rosenthal23-Jul-15 3:36
Aaron Rosenthal23-Jul-15 3:36 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Richard Deeming23-Jul-15 3:56
mveRichard Deeming23-Jul-15 3:56 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Aaron Rosenthal23-Jul-15 4:24
Aaron Rosenthal23-Jul-15 4:24 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Richard Deeming23-Jul-15 4:51
mveRichard Deeming23-Jul-15 4:51 
Are you expecting to get null characters returned from the database?

As far as I can see, the only reason you're getting null characters in your string is because you're ignoring the retval value, and creating a string that represents the entire array. Since all of the array entries beyond retval will be set to the null character, you're ending up with a long list of nulls on the end, which you're then having to remove.

With your current code, you could use:
VB.NET
rawStr = New String(outChar, 0, retval)

which would avoid adding those null characters to the string in the first place.

With my version, the line:
VB.NET
myxml.WriteRaw(outChar, 0, retval)

also avoids writing null characters to the output.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Aaron Rosenthal23-Jul-15 6:11
Aaron Rosenthal23-Jul-15 6:11 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Richard Deeming23-Jul-15 6:20
mveRichard Deeming23-Jul-15 6:20 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Aaron Rosenthal23-Jul-15 6:24
Aaron Rosenthal23-Jul-15 6:24 
SuggestionRe: OracleDataReader GetChars method only buffering half the characters Pin
Richard Deeming23-Jul-15 6:25
mveRichard Deeming23-Jul-15 6:25 
AnswerRe: OracleDataReader GetChars method only buffering half the characters Pin
Richard Deeming23-Jul-15 6:37
mveRichard Deeming23-Jul-15 6:37 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Aaron Rosenthal23-Jul-15 8:02
Aaron Rosenthal23-Jul-15 8:02 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Eddy Vluggen23-Jul-15 9:19
professionalEddy Vluggen23-Jul-15 9:19 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Richard Deeming23-Jul-15 9:50
mveRichard Deeming23-Jul-15 9:50 
GeneralRe: OracleDataReader GetChars method only buffering half the characters Pin
Eddy Vluggen23-Jul-15 10:27
professionalEddy Vluggen23-Jul-15 10:27 
QuestionHow to rename texts in a Standart Browse File / Browse Folder Dialog Pin
satc22-Jul-15 4:14
satc22-Jul-15 4:14 
AnswerRe: How to rename texts in a Standart Browse File / Browse Folder Dialog Pin
Eddy Vluggen22-Jul-15 4:38
professionalEddy Vluggen22-Jul-15 4:38 
GeneralRe: How to rename texts in a Standart Browse File / Browse Folder Dialog Pin
satc22-Jul-15 20:02
satc22-Jul-15 20:02 
GeneralRe: How to rename texts in a Standart Browse File / Browse Folder Dialog Pin
Eddy Vluggen22-Jul-15 21:40
professionalEddy Vluggen22-Jul-15 21:40 
QuestionA validation information inside a zip file Pin
satc22-Jul-15 2:43
satc22-Jul-15 2:43 
AnswerRe: A validation information inside a zip file Pin
Eddy Vluggen22-Jul-15 3:51
professionalEddy Vluggen22-Jul-15 3:51 
AnswerRe: A validation information inside a zip file Pin
Dave Kreskowiak22-Jul-15 3:53
mveDave Kreskowiak22-Jul-15 3:53 
GeneralRe: A validation information inside a zip file Pin
satc26-Jul-15 0:11
satc26-Jul-15 0:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.