Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# and query result Pin
User34903-Jul-13 10:15
User34903-Jul-13 10:15 
GeneralRe: c# and query result Pin
Pete O'Hanlon3-Jul-13 10:20
mvePete O'Hanlon3-Jul-13 10:20 
GeneralRe: c# and query result Pin
User34903-Jul-13 10:23
User34903-Jul-13 10:23 
GeneralRe: c# and query result Pin
Pete O'Hanlon3-Jul-13 10:29
mvePete O'Hanlon3-Jul-13 10:29 
GeneralRe: c# and query result Pin
KiranKumar Roy3-Jul-13 20:10
KiranKumar Roy3-Jul-13 20:10 
GeneralRe: c# and query result Pin
User34904-Jul-13 11:11
User34904-Jul-13 11:11 
Questionc# and query result Pin
User34903-Jul-13 7:21
User34903-Jul-13 7:21 
AnswerRe: c# and query result Pin
OriginalGriff3-Jul-13 8:35
mveOriginalGriff3-Jul-13 8:35 
It all depends on what your query is actually returning: it is very possible that your line:
C#
string rfyear = ((string)cmd_year.ExecuteScalar());
Will not work, but throw an InvalidCastException because the data coming back can't be cast to a string - it may work if you change it to:
C#
string rfyear = cmd_year.ExecuteScalar().ToString();
But...I wouldn't recommend it as there is a very good chance that you will get a string containing the name of the type of the value returned.

What does your query return when it works and when it fails?
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

QuestionCommon Trace Format in C# Pin
srikumarrampa3-Jul-13 4:08
srikumarrampa3-Jul-13 4:08 
AnswerRe: Common Trace Format in C# Pin
Pete O'Hanlon3-Jul-13 4:51
mvePete O'Hanlon3-Jul-13 4:51 
QuestionInstall application without install SQLSERVER Pin
dharmaa.m2-Jul-13 8:38
dharmaa.m2-Jul-13 8:38 
AnswerRe: Install application without install SQLSERVER Pin
Ron Beyer2-Jul-13 9:18
professionalRon Beyer2-Jul-13 9:18 
GeneralRe: Install application without install SQLSERVER Pin
dharmaa.m2-Jul-13 9:44
dharmaa.m2-Jul-13 9:44 
GeneralRe: Install application without install SQLSERVER Pin
Ron Beyer2-Jul-13 9:50
professionalRon Beyer2-Jul-13 9:50 
AnswerRe: Install application without install SQLSERVER Pin
Manu V Nath3-Jul-13 23:30
professionalManu V Nath3-Jul-13 23:30 
GeneralRe: Install application without install SQLSERVER Pin
Eddy Vluggen4-Jul-13 0:01
professionalEddy Vluggen4-Jul-13 0:01 
QuestionC# deployment creating a porject folder Pin
classy_dog2-Jul-13 6:38
classy_dog2-Jul-13 6:38 
AnswerRe: C# deployment creating a porject folder Pin
NickPace3-Jul-13 6:30
NickPace3-Jul-13 6:30 
QuestionHow to combine ClickOnce and normal installer Pin
MathijsBeentjes2-Jul-13 5:47
MathijsBeentjes2-Jul-13 5:47 
AnswerRe: How to combine ClickOnce and normal installer Pin
GuyThiebaut3-Jul-13 0:08
professionalGuyThiebaut3-Jul-13 0:08 
QuestionRadio buttons in PropertyGrid Pin
lukeer1-Jul-13 21:02
lukeer1-Jul-13 21:02 
AnswerRe: Radio buttons in PropertyGrid Pin
Eddy Vluggen1-Jul-13 22:30
professionalEddy Vluggen1-Jul-13 22:30 
GeneralRe: Radio buttons in PropertyGrid Pin
lukeer11-Jul-13 1:21
lukeer11-Jul-13 1:21 
AnswerRe: Radio buttons in PropertyGrid Pin
Eddy Vluggen15-Jul-13 8:53
professionalEddy Vluggen15-Jul-13 8:53 
QuestionHow to lock only one request and release all pending requests at once Pin
amjegan1-Jul-13 18:14
amjegan1-Jul-13 18:14 

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.