Click here to Skip to main content
15,916,442 members
Home / Discussions / Database
   

Database

 
GeneralRe: Correct this sql Pin
Abdul-Rhman Alsri6-May-10 4:01
Abdul-Rhman Alsri6-May-10 4:01 
GeneralRe: Correct this sql Pin
loyal ginger6-May-10 5:29
loyal ginger6-May-10 5:29 
GeneralRe: Correct this sql Pin
Abdul-Rhman Alsri6-May-10 6:11
Abdul-Rhman Alsri6-May-10 6:11 
GeneralRe: Correct this sql Pin
Abdul-Rhman Alsri6-May-10 6:14
Abdul-Rhman Alsri6-May-10 6:14 
GeneralRe: Correct this sql Pin
Simon_Whale6-May-10 6:20
Simon_Whale6-May-10 6:20 
QuestionI'm stuck on - Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
gmhanna5-May-10 7:56
gmhanna5-May-10 7:56 
AnswerRe: I'm stuck on - Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
Simon_Whale5-May-10 10:07
Simon_Whale5-May-10 10:07 
AnswerRe: I'm stuck on - Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
Johan Hakkesteegt6-May-10 0:08
Johan Hakkesteegt6-May-10 0:08 
AnswerRe: I'm stuck on - Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
gmhanna6-May-10 4:37
gmhanna6-May-10 4:37 
QuestionHow to delete related Data/Rows. Pin
Abdul-Rhman Alsri5-May-10 3:34
Abdul-Rhman Alsri5-May-10 3:34 
AnswerRe: How to delete related Data/Rows. Pin
Simon_Whale5-May-10 5:08
Simon_Whale5-May-10 5:08 
GeneralRe: How to delete related Data/Rows. Pin
fjdiewornncalwe6-May-10 8:21
professionalfjdiewornncalwe6-May-10 8:21 
QuestionComparing rows to columns Pin
rajanandal4-May-10 23:09
rajanandal4-May-10 23:09 
AnswerRe: Comparing rows to columns Pin
Johan Hakkesteegt6-May-10 0:13
Johan Hakkesteegt6-May-10 0:13 
QuestionSqlServer: How to drop a column with a randomly named (default) constraint? Pin
Super Lloyd4-May-10 13:59
Super Lloyd4-May-10 13:59 
AnswerRe: SqlServer: How to drop a column with a randomly named (default) constraint? Pin
Super Lloyd4-May-10 15:01
Super Lloyd4-May-10 15:01 
QuestionRetrieving a DateTime value with OracleClient Pin
Bernhard Hiller4-May-10 5:24
Bernhard Hiller4-May-10 5:24 
Hello,
I am trying to read a DateTime value from an Oracle database (Oracle Version 11.2.0.1.0 running on a German Windows XP). The column is defined as "DATE", and the value is correctly shown as "2010-05-04 16:17:10.0" via the web browser when viewing all the data of the respective table.

But when I retrieve the data with the OracleClient (via OracleCommand and OracleDataReader) in a C# application (.NET 2), I receive a string (!) value of
"04.05.10      "
, i.e. reader["LASTLOGIN"] returns a string with that value which I then convert to a DateTime using the Convert.ToDateTime() function.

By the way, a
int lastLoginCol = reader.GetOrdinal("LASTLOGIN");
LastLogin = reader.GetDateTime(lastLoginCol);

yields a "Specific cast is not valid" error message.

Please note the 6 blanks after the date part. Where has the time part gone to?
How can I retrieve the full date time value? Is the answer: "Not at all, it's Oracle"?
And what about a situation where the server is running with a different locale than the client? Is it really necessary to change to CHAR 14 (i.e. YYYYMMDDhhmmss - that does work with some tricks)?
Thanks a lot for your ideas!
Bernhard
AnswerRe: Retrieving a DateTime value with OracleClient Pin
Chris Meech5-May-10 2:56
Chris Meech5-May-10 2:56 
GeneralRe: Retrieving a DateTime value with OracleClient Pin
David Skelly5-May-10 4:49
David Skelly5-May-10 4:49 
GeneralRe: Retrieving a DateTime value with OracleClient Pin
Bernhard Hiller6-May-10 21:36
Bernhard Hiller6-May-10 21:36 
QuestionSQL Server 2008 Spatial Data Pin
Bassam Saoud4-May-10 4:34
Bassam Saoud4-May-10 4:34 
AnswerRe: SQL Server 2008 Spatial Data Pin
Peter_in_27805-May-10 18:36
professionalPeter_in_27805-May-10 18:36 
GeneralRe: SQL Server 2008 Spatial Data Pin
Bassam Saoud6-May-10 4:09
Bassam Saoud6-May-10 4:09 
Questionhow to write querry for this month,3months ,6months,annual Pin
developerit4-May-10 1:05
developerit4-May-10 1:05 
AnswerRe: how to write querry for this month,3months ,6months,annual Pin
Corporal Agarn4-May-10 6:35
professionalCorporal Agarn4-May-10 6:35 

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.