Click here to Skip to main content
15,924,452 members
Home / Discussions / C#
   

C#

 
Questionhelp me in this code Pin
Kulbeer sidhu2-Apr-16 2:18
Kulbeer sidhu2-Apr-16 2:18 
AnswerRe: help me in this code Pin
OriginalGriff2-Apr-16 2:31
mveOriginalGriff2-Apr-16 2:31 
GeneralRe: help me in this code Pin
Ratul Thakur2-Apr-16 4:15
Ratul Thakur2-Apr-16 4:15 
AnswerRe: help me in this code Pin
Ratul Thakur2-Apr-16 3:52
Ratul Thakur2-Apr-16 3:52 
GeneralRe: help me in this code Pin
Sascha Lefèvre2-Apr-16 4:50
professionalSascha Lefèvre2-Apr-16 4:50 
GeneralRe: help me in this code Pin
Ratul Thakur2-Apr-16 6:33
Ratul Thakur2-Apr-16 6:33 
GeneralRe: help me in this code Pin
F-ES Sitecore3-Apr-16 4:15
professionalF-ES Sitecore3-Apr-16 4:15 
GeneralRe: help me in this code Pin
Pete O'Hanlon3-Apr-16 4:51
mvePete O'Hanlon3-Apr-16 4:51 
GeneralRe: help me in this code Pin
F-ES Sitecore3-Apr-16 4:56
professionalF-ES Sitecore3-Apr-16 4:56 
GeneralRe: help me in this code Pin
Ratul Thakur3-Apr-16 7:46
Ratul Thakur3-Apr-16 7:46 
GeneralRe: help me in this code Pin
Sascha Lefèvre3-Apr-16 13:11
professionalSascha Lefèvre3-Apr-16 13:11 
GeneralRe: help me in this code Pin
F-ES Sitecore3-Apr-16 22:38
professionalF-ES Sitecore3-Apr-16 22:38 
JokeRe: help me in this code Pin
Pete O'Hanlon3-Apr-16 22:57
mvePete O'Hanlon3-Apr-16 22:57 
AnswerRe: help me in this code Pin
Sascha Lefèvre2-Apr-16 5:10
professionalSascha Lefèvre2-Apr-16 5:10 
GeneralRe: help me in this code Pin
OriginalGriff2-Apr-16 6:16
mveOriginalGriff2-Apr-16 6:16 
GeneralRe: help me in this code Pin
Mycroft Holmes2-Apr-16 13:32
professionalMycroft Holmes2-Apr-16 13:32 
GeneralRe: help me in this code Pin
Sascha Lefèvre2-Apr-16 14:15
professionalSascha Lefèvre2-Apr-16 14:15 
GeneralRe: help me in this code Pin
Mycroft Holmes2-Apr-16 16:32
professionalMycroft Holmes2-Apr-16 16:32 
AnswerRe: help me in this code Pin
Suresh73-Apr-16 5:55
Suresh73-Apr-16 5:55 
QuestionInput string was not in a correct format as output in c# console application Pin
KittoKy2-Apr-16 1:48
KittoKy2-Apr-16 1:48 
AnswerRe: Input string was not in a correct format as output in c# console application Pin
OriginalGriff2-Apr-16 2:25
mveOriginalGriff2-Apr-16 2:25 
Use the debugger.
Put a breakpoint on the line
C#
Console.WriteLine("read from dt");

and run your app.
When it hits the line, it will stop and let you look at exactly what is happening.
Look at each of the values in your DataReader - at least one of them is not a string representation of a double value.
We can't do that for you: we don't have your data!

BTW: Two things.
1) You should use a using block for SqlConnections, SqlCommands, and so forth to ensure they are correctly disposed.
2) Unless you specify a sort order in your SQL query via a ORDER BY clause, SQL is at liberty to return rows in any order it feels like - so you may not get the same values in two consecutive runs. Always specify the order if you want to return specific rows!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

QuestionWrite/Read ISBN of a book in NXP tag and Turn security ON/OFF Pin
Mahbubur Rahman Rajib2-Apr-16 0:06
Mahbubur Rahman Rajib2-Apr-16 0:06 
AnswerRe: Write/Read ISBN of a book in NXP tag and Turn security ON/OFF Pin
OriginalGriff2-Apr-16 0:09
mveOriginalGriff2-Apr-16 0:09 
GeneralRe: Write/Read ISBN of a book in NXP tag and Turn security ON/OFF Pin
Mahbubur Rahman Rajib2-Apr-16 0:13
Mahbubur Rahman Rajib2-Apr-16 0:13 
GeneralRe: Write/Read ISBN of a book in NXP tag and Turn security ON/OFF Pin
OriginalGriff2-Apr-16 0:19
mveOriginalGriff2-Apr-16 0:19 

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.