Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
AnswerRe: creae application shortcut Pin
Bernhard Hiller9-Aug-11 20:17
Bernhard Hiller9-Aug-11 20:17 
QuestionUI, BLL and DAL Pin
paper679-Aug-11 4:17
paper679-Aug-11 4:17 
AnswerRe: UI, BLL and DAL Pin
Shameel9-Aug-11 4:26
professionalShameel9-Aug-11 4:26 
AnswerRe: UI, BLL and DAL Pin
PIEBALDconsult9-Aug-11 5:19
mvePIEBALDconsult9-Aug-11 5:19 
GeneralRe: UI, BLL and DAL Pin
paper679-Aug-11 6:20
paper679-Aug-11 6:20 
GeneralRe: UI, BLL and DAL Pin
PIEBALDconsult9-Aug-11 14:36
mvePIEBALDconsult9-Aug-11 14:36 
AnswerRe: UI, BLL and DAL Pin
Not Active9-Aug-11 5:27
mentorNot Active9-Aug-11 5:27 
QuestionExecuteScalar return value Pin
vanikanc9-Aug-11 3:38
vanikanc9-Aug-11 3:38 
Hello,

I have used this method but to return a single int value. Now I am returuing a string.

I have tried to define the local variable as a string as well as object. It just does not seem to be returning a string value.

I have tried the following different ways:
1. string name = sqlcommRights.ExecuteScalar() as string;
2. string name = (string)sqlcommRights.ExecuteScalar();
3. object name = sqlcommRights.ExecuteScalar();

I am printing the SQL statement and running in sql server, that returns a single row value like 'John Smith'.

To check value - Response.Write(name);
Am I missing something here?
AnswerRe: ExecuteScalar return value Pin
Gareth H9-Aug-11 3:46
Gareth H9-Aug-11 3:46 
AnswerRe: ExecuteScalar return value Pin
Keith Barrow9-Aug-11 3:47
professionalKeith Barrow9-Aug-11 3:47 
AnswerRe: ExecuteScalar return value Pin
Shameel9-Aug-11 4:15
professionalShameel9-Aug-11 4:15 
AnswerRe: ExecuteScalar return value Pin
Matt Meyer9-Aug-11 4:38
Matt Meyer9-Aug-11 4:38 
AnswerRe: ExecuteScalar return value Pin
PIEBALDconsult9-Aug-11 5:14
mvePIEBALDconsult9-Aug-11 5:14 
QuestionSignature of the Program or application Pin
sarang_k9-Aug-11 0:38
sarang_k9-Aug-11 0:38 
AnswerRe: Signature of the Program or application Pin
Pete O'Hanlon9-Aug-11 0:40
mvePete O'Hanlon9-Aug-11 0:40 
GeneralRe: Signature of the Program or application Pin
sarang_k9-Aug-11 0:41
sarang_k9-Aug-11 0:41 
AnswerRe: Signature of the Program or application Pin
Shameel9-Aug-11 0:48
professionalShameel9-Aug-11 0:48 
GeneralRe: Signature of the Program or application Pin
Manfred Rudolf Bihy9-Aug-11 2:50
professionalManfred Rudolf Bihy9-Aug-11 2:50 
GeneralRe: Signature of the Program or application Pin
Shameel9-Aug-11 4:17
professionalShameel9-Aug-11 4:17 
AnswerRe: Signature of the Program or application Pin
Pravin Patil, Mumbai9-Aug-11 1:10
Pravin Patil, Mumbai9-Aug-11 1:10 
QuestionGetting Coordinates of Typed Letters in Textbox Pin
AmbiguousName8-Aug-11 23:28
AmbiguousName8-Aug-11 23:28 
AnswerRe: Getting Coordinates of Typed Letters in Textbox Pin
BobJanova9-Aug-11 0:50
BobJanova9-Aug-11 0:50 
GeneralRe: Getting Coordinates of Typed Letters in Textbox Pin
Pravin Patil, Mumbai9-Aug-11 1:11
Pravin Patil, Mumbai9-Aug-11 1:11 
AnswerRe: Getting Coordinates of Typed Letters in Textbox Pin
BillWoodruff9-Aug-11 9:43
professionalBillWoodruff9-Aug-11 9:43 
Questionembded image im datagridviewimagecolumn problem Pin
md_refay8-Aug-11 22:23
md_refay8-Aug-11 22:23 

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.