.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 23rd, 2007, 09:56 AM
mikelis mikelis is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 1 mikelis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 27 sec
Reputation Power: 0
System.Data.OracleClient.OracleDataReader trruncates a field

I've been having an issue with reader.getString truncating the output of a Oracale DB table column from the second row on. The following is an example of the output where "RUNNING" (which is type varchar2[255]) gets truncated:

SERVERNAME SERVERSTATE REPORTTIME
feshrpmmk01win RUNNING 07/23/2007 1:38:26 PM
feshrpmmk121win RUNN 07/23/2007 1:38:27 PM
feshrpmmk120win RUNN 07/23/2007 1:38:40 PM

Here is a code snippet:
string sql = "SELECT * FROM SERVERS";
command.CommandText = sql;

OracleDataReader reader = command.ExecuteReader();
while (reader.HasRows)
{
Console.WriteLine("\t{0}\t{1}\t{2}", reader.GetName(0),reader.GetName(1),reader.GetName (4));
while (reader.Read())
{
Console.WriteLine("\t{0}\t{1}\t{2}", reader.GetString(0),reader.GetSqlString(1),reader. GetDateTime(4));
}
reader.NextResult();
}

Any idea why this is happening and what i can do to fix it?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > System.Data.OracleClient.OracleDataReader trruncates a field


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT