Click here to Skip to main content
15,891,828 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: A spontaneous composition Pin
Mike Hankey10-Jun-19 4:12
mveMike Hankey10-Jun-19 4:12 
GeneralRe: A spontaneous composition Pin
Roger Wright11-Jun-19 17:03
professionalRoger Wright11-Jun-19 17:03 
QuestionC# insert into Pin
SuperJWP9-Jun-19 8:47
SuperJWP9-Jun-19 8:47 
GeneralRe: C# insert into Pin
PIEBALDconsult9-Jun-19 8:56
mvePIEBALDconsult9-Jun-19 8:56 
GeneralRe: C# insert into Pin
Marc Clifton10-Jun-19 2:33
mvaMarc Clifton10-Jun-19 2:33 
AnswerRe: C# insert into Pin
OriginalGriff9-Jun-19 9:25
mveOriginalGriff9-Jun-19 9:25 
AnswerRe: C# insert into Pin
ZurdoDev10-Jun-19 1:54
professionalZurdoDev10-Jun-19 1:54 
AnswerRe: C# insert into Pin
Slow Eddie11-Jun-19 5:10
professionalSlow Eddie11-Jun-19 5:10 
The post above mine is also correct. You need to do something like:
"cmd.Paremeters.AddwithValue("@Emp_Name", "Slow Eddie")"

I use Stored Procedures in the Database. You need to match the parameter type (Decimal, Int16, Int32, Int64, float , etc. to the stored procedure and the Table definition.

Start by checking out Data Value types in C# and SqlServer first.

Stored procedures are safer as they help to prevent SqlInjection attacks as well.

Hopes this helps. Been there myself and this works the for me. Smile | :)
I hate Acronyms....

GeneralThe world on Sunday Pin
OriginalGriff9-Jun-19 5:57
mveOriginalGriff9-Jun-19 5:57 
GeneralRe: The world on Sunday Pin
Dean Roddey9-Jun-19 6:06
Dean Roddey9-Jun-19 6:06 
GeneralRe: The world on Sunday Pin
Mike Hankey9-Jun-19 7:00
mveMike Hankey9-Jun-19 7:00 
GeneralRe: The world on Sunday Pin
RickZeeland9-Jun-19 10:41
mveRickZeeland9-Jun-19 10:41 
GeneralRe: The world on Sunday Pin
Mike Hankey9-Jun-19 11:05
mveMike Hankey9-Jun-19 11:05 
AnswerRe: The world on Sunday Pin
lopatir9-Jun-19 7:33
lopatir9-Jun-19 7:33 
GeneralRe: The world on Sunday Pin
PeejayAdams9-Jun-19 23:53
PeejayAdams9-Jun-19 23:53 
AnswerRe: The world on Sunday Pin
ZurdoDev10-Jun-19 1:56
professionalZurdoDev10-Jun-19 1:56 
GeneralRe: The world on Sunday Pin
OriginalGriff10-Jun-19 2:34
mveOriginalGriff10-Jun-19 2:34 
GeneralRe: The world on Sunday Pin
ZurdoDev10-Jun-19 2:38
professionalZurdoDev10-Jun-19 2:38 
NewsXCOM: ENEMY UNKNOWN Pin
RickZeeland9-Jun-19 1:43
mveRickZeeland9-Jun-19 1:43 
GeneralRe: XCOM: ENEMY UNKNOWN Pin
charlieg9-Jun-19 10:17
charlieg9-Jun-19 10:17 
GeneralRe: XCOM: ENEMY UNKNOWN Pin
RickZeeland9-Jun-19 10:35
mveRickZeeland9-Jun-19 10:35 
GeneralRe: XCOM: ENEMY UNKNOWN Pin
Kschuler10-Jun-19 7:06
Kschuler10-Jun-19 7:06 
GeneralRe: XCOM: ENEMY UNKNOWN Pin
RickZeeland10-Jun-19 8:16
mveRickZeeland10-Jun-19 8:16 
GeneralRe: XCOM: ENEMY UNKNOWN Pin
Alina Popa12-Jun-19 4:38
Alina Popa12-Jun-19 4:38 
GeneralRe: XCOM: ENEMY UNKNOWN Pin
RickZeeland12-Jun-19 6:47
mveRickZeeland12-Jun-19 6:47 

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.