|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > System.Data.OracleClient.OracleDataReader trruncates a field |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|