Click here to Skip to main content
15,868,016 members
Home / Discussions / Database
   

Database

 
Rant[REPOST] data between 1st jan to December 31st of previous year query --no hard coded dates. Pin
Richard Deeming8-Jan-18 7:27
mveRichard Deeming8-Jan-18 7:27 
QuestionOLE DB Data Types to C# Data Type Mapping Pin
User9874325-Dec-17 17:55
professionalUser9874325-Dec-17 17:55 
AnswerRe: OLE DB Data Types to C# Data Type Mapping Pin
Richard MacCutchan25-Dec-17 20:55
mveRichard MacCutchan25-Dec-17 20:55 
AnswerRe: OLE DB Data Types to C# Data Type Mapping Pin
Mycroft Holmes25-Dec-17 21:33
professionalMycroft Holmes25-Dec-17 21:33 
GeneralRe: OLE DB Data Types to C# Data Type Mapping Pin
User9874325-Dec-17 22:57
professionalUser9874325-Dec-17 22:57 
GeneralRe: OLE DB Data Types to C# Data Type Mapping Pin
jschell26-Dec-17 7:39
jschell26-Dec-17 7:39 
GeneralRe: OLE DB Data Types to C# Data Type Mapping Pin
User9874314-Jan-18 10:44
professionalUser9874314-Jan-18 10:44 
SuggestionRe: OLE DB Data Types to C# Data Type Mapping Pin
Richard Deeming8-Jan-18 7:38
mveRichard Deeming8-Jan-18 7:38 
You don't need the extra cast - the Field<T> method already returns the correct type. There's no boxing/unboxing involved.
C#
long ORDINAL_POSITION = row.Field<Int64> ( "ORDINAL_POSITION" );
ushort DATA_TYPE = row.Field<UInt16> ( "DATA_TYPE" );

The C# types are just aliases for the .NET equivalents; so long === System.Int64, etc.

I suspect the documentation is probably wrong, and the DATA_TYPE column is most likely an Int32, which can then be cast to an OleDbType value. Check the value returned by table.Columns["DATA_TYPE"].DataType to see what it's defined as.



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


GeneralRe: OLE DB Data Types to C# Data Type Mapping Pin
User9874314-Jan-18 10:50
professionalUser9874314-Jan-18 10:50 
QuestionT-SQL and denomalization of Parent and Child hierarchy Tables Pin
Member 1358789920-Dec-17 21:41
Member 1358789920-Dec-17 21:41 
AnswerRe: T-SQL and denomalization of Parent and Child hierarchy Tables Pin
Victor Nijegorodov21-Dec-17 1:54
Victor Nijegorodov21-Dec-17 1:54 
QuestionTo convert an Excel file to CSV and then move that data from CSV to oracle database. Pin
sai.201218-Dec-17 8:23
sai.201218-Dec-17 8:23 
AnswerRe: To convert an Excel file to CSV and then move that data from CSV to oracle database. Pin
jschell18-Dec-17 15:51
jschell18-Dec-17 15:51 
QuestionRe: To convert an Excel file to CSV and then move that data from CSV to oracle database. Pin
Richard MacCutchan18-Dec-17 21:35
mveRichard MacCutchan18-Dec-17 21:35 
QuestionMicrosoft SQL Server VS PostgresSQL Pin
Zeyad Jalil18-Dec-17 0:02
professionalZeyad Jalil18-Dec-17 0:02 
AnswerRe: Microsoft SQL Server VS PostgresSQL Pin
Nathan Minier18-Dec-17 1:13
professionalNathan Minier18-Dec-17 1:13 
AnswerRe: Microsoft SQL Server VS PostgresSQL Pin
jschell18-Dec-17 15:52
jschell18-Dec-17 15:52 
QuestionOverwrite from DB as windows Services Pin
Member 1204258517-Dec-17 18:46
Member 1204258517-Dec-17 18:46 
AnswerRe: Overwrite from DB as windows Services Pin
Victor Nijegorodov17-Dec-17 20:54
Victor Nijegorodov17-Dec-17 20:54 
QuestionBuying of referrals Pin
Member 1357942916-Dec-17 0:13
Member 1357942916-Dec-17 0:13 
AnswerRe: Buying of referrals Pin
Richard MacCutchan16-Dec-17 0:49
mveRichard MacCutchan16-Dec-17 0:49 
GeneralRe: Buying of referrals Pin
Member 1357942916-Dec-17 2:41
Member 1357942916-Dec-17 2:41 
GeneralRe: Buying of referrals Pin
OriginalGriff16-Dec-17 2:43
mveOriginalGriff16-Dec-17 2:43 
QuestionSybase query returns blank/empty for char fields Pin
Member 1354244115-Dec-17 6:56
Member 1354244115-Dec-17 6:56 
AnswerRe: Sybase query returns blank/empty for char fields Pin
jschell16-Dec-17 9:06
jschell16-Dec-17 9:06 

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.