Click here to Skip to main content
15,904,288 members
Home / Discussions / C#
   

C#

 
Generalincrement by 1 Pin
eyeseetee7-Dec-07 4:41
eyeseetee7-Dec-07 4:41 
AnswerRe: increment by 1 Pin
Guffa7-Dec-07 4:51
Guffa7-Dec-07 4:51 
GeneralRe: increment by 1 Pin
eyeseetee7-Dec-07 4:58
eyeseetee7-Dec-07 4:58 
AnswerRe: increment by 1 Pin
Guffa7-Dec-07 5:04
Guffa7-Dec-07 5:04 
GeneralRe: increment by 1 Pin
eyeseetee7-Dec-07 5:10
eyeseetee7-Dec-07 5:10 
GeneralRe: increment by 1 Pin
Ian Shlasko7-Dec-07 5:21
Ian Shlasko7-Dec-07 5:21 
GeneralRe: increment by 1 Pin
eyeseetee7-Dec-07 5:26
eyeseetee7-Dec-07 5:26 
GeneralRe: increment by 1 Pin
Ian Shlasko7-Dec-07 5:41
Ian Shlasko7-Dec-07 5:41 
Thought so... Try putting it in an object instead of an int (Without casting), just for debugging, and see what type it is (Set a breakpoint and take a look at it). If it's a different numeric type, just use Convert.ToInt32() instead of a direct cast. If you're getting a DBNull or a non-numeric type, there's something wrong with your query.

Also, in light of the other branch of this thread, remember that this isn't going to modify the database. All you're doing is asking the database for a number, and incrementing your copy of that number. If you want to make a change to the database, that's a separate operation.
GeneralRe: increment by 1 Pin
eyeseetee7-Dec-07 6:26
eyeseetee7-Dec-07 6:26 
GeneralRe: increment by 1 Pin
Ian Shlasko7-Dec-07 7:27
Ian Shlasko7-Dec-07 7:27 
GeneralRe: increment by 1 Pin
Ennis Ray Lynch, Jr.7-Dec-07 4:58
Ennis Ray Lynch, Jr.7-Dec-07 4:58 
GeneralRe: increment by 1 Pin
eyeseetee7-Dec-07 5:10
eyeseetee7-Dec-07 5:10 
GeneralYes Pin
Ennis Ray Lynch, Jr.7-Dec-07 5:13
Ennis Ray Lynch, Jr.7-Dec-07 5:13 
GeneralRe: Yes Pin
eyeseetee7-Dec-07 5:18
eyeseetee7-Dec-07 5:18 
GeneralRe: Yes Pin
Ennis Ray Lynch, Jr.7-Dec-07 5:19
Ennis Ray Lynch, Jr.7-Dec-07 5:19 
GeneralRe: Yes Pin
eyeseetee7-Dec-07 5:21
eyeseetee7-Dec-07 5:21 
GeneralRe: Yes Pin
Xmen Real 7-Dec-07 5:54
professional Xmen Real 7-Dec-07 5:54 
GeneralRe: Yes Pin
Guffa7-Dec-07 7:20
Guffa7-Dec-07 7:20 
GeneralHiding a tabsheet Pin
Dewald7-Dec-07 4:38
Dewald7-Dec-07 4:38 
GeneralRe: Hiding a tabsheet Pin
Anthony Mushrow7-Dec-07 6:20
professionalAnthony Mushrow7-Dec-07 6:20 
GeneralSetting focus on new DeckItem [modified] Pin
oracleConvert7-Dec-07 4:24
oracleConvert7-Dec-07 4:24 
GeneralRe: Setting focus on new DeckItem Pin
Skippums7-Dec-07 5:14
Skippums7-Dec-07 5:14 
GeneralRe: Setting focus on new DeckItem Pin
oracleConvert7-Dec-07 5:51
oracleConvert7-Dec-07 5:51 
GeneralRe: Setting focus on new DeckItem Pin
Skippums7-Dec-07 6:13
Skippums7-Dec-07 6:13 
GeneralRe: Setting focus on new DeckItem Pin
oracleConvert7-Dec-07 6:21
oracleConvert7-Dec-07 6:21 

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.