Click here to Skip to main content
15,894,343 members
Home / Discussions / C#
   

C#

 
AnswerRe: Uploading and resizing Image files Pin
KaptinKrunch25-Oct-05 2:46
KaptinKrunch25-Oct-05 2:46 
QuestionUpdater Application Block for Office Add In Pin
JeremyHutchinson24-Oct-05 23:19
JeremyHutchinson24-Oct-05 23:19 
Questiona couple of C# questions Pin
Brendan Vogt24-Oct-05 23:05
Brendan Vogt24-Oct-05 23:05 
AnswerRe: a couple of C# questions Pin
Rob Philpott24-Oct-05 23:52
Rob Philpott24-Oct-05 23:52 
QuestionRe: a couple of C# questions Pin
Brendan Vogt25-Oct-05 1:06
Brendan Vogt25-Oct-05 1:06 
AnswerRe: a couple of C# questions Pin
Rob Philpott25-Oct-05 1:33
Rob Philpott25-Oct-05 1:33 
QuestionRe: a couple of C# questions Pin
Brendan Vogt25-Oct-05 1:50
Brendan Vogt25-Oct-05 1:50 
AnswerRe: a couple of C# questions Pin
Rob Philpott25-Oct-05 2:05
Rob Philpott25-Oct-05 2:05 
OK. I think you're code is fine as it is.

SqlParameter.Value is of type Object which expects either a DBNull or a value (which is what you give it), and the type SqlDbType.Money is decimal. No casting is necessary.

One point though - this implementation means that a value of 0.00 can't be put into the database. DBNull is used to mean 'not applicable here' not zero. So for instance if you wanted to maintain the balance of a bank account without any funds in it you couldn't. The balance would not be 0.00, the balance would not exist.



Rob Philpott.
AnswerRe: a couple of C# questions Pin
Gavin Jeffrey25-Oct-05 0:00
Gavin Jeffrey25-Oct-05 0:00 
QuestionRe: a couple of C# questions Pin
Brendan Vogt25-Oct-05 1:12
Brendan Vogt25-Oct-05 1:12 
AnswerRe: a couple of C# questions Pin
Brian Leach25-Oct-05 10:39
Brian Leach25-Oct-05 10:39 
QuestionPlease help me... Pin
KORCARI24-Oct-05 21:39
KORCARI24-Oct-05 21:39 
AnswerRe: Please help me... Pin
Peto198325-Oct-05 2:11
Peto198325-Oct-05 2:11 
QuestionC# Reflection Pin
koyllis24-Oct-05 21:06
koyllis24-Oct-05 21:06 
AnswerRe: C# Reflection Pin
Rob Philpott25-Oct-05 0:05
Rob Philpott25-Oct-05 0:05 
QuestionOther sources with C# Pin
Anonymous24-Oct-05 19:29
Anonymous24-Oct-05 19:29 
AnswerRe: Other sources with C# Pin
Christian Graus24-Oct-05 19:33
protectorChristian Graus24-Oct-05 19:33 
QuestionCreating toolbox in C# Pin
nps_ltv24-Oct-05 19:05
nps_ltv24-Oct-05 19:05 
AnswerRe: Creating toolbox in C# Pin
Christian Graus24-Oct-05 19:13
protectorChristian Graus24-Oct-05 19:13 
AnswerRe: Creating toolbox in C# Pin
edvo25-Oct-05 0:42
edvo25-Oct-05 0:42 
QuestionData posting Pin
NET_GEEK24-Oct-05 18:21
NET_GEEK24-Oct-05 18:21 
QuestionServer.Create(<Object>) Pin
NET_GEEK24-Oct-05 18:16
NET_GEEK24-Oct-05 18:16 
AnswerRe: Server.Create(<Object>) Pin
Christian Graus24-Oct-05 18:51
protectorChristian Graus24-Oct-05 18:51 
QuestionClass Stucture Question Pin
jgallen2324-Oct-05 14:49
jgallen2324-Oct-05 14:49 
AnswerRe: Class Stucture Question Pin
Christian Graus24-Oct-05 15:26
protectorChristian Graus24-Oct-05 15:26 

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.