Click here to Skip to main content
16,010,553 members
Home / Discussions / C#
   

C#

 
Question(WPF)Navigating with windows and custom controls? [modified] Pin
wolfshad35-Nov-07 6:34
wolfshad35-Nov-07 6:34 
AnswerRe: (WPF)Navigating with windows and custom controls? Pin
Judah Gabriel Himango5-Nov-07 7:14
sponsorJudah Gabriel Himango5-Nov-07 7:14 
GeneralRe: (WPF)Navigating with windows and custom controls? Pin
wolfshad35-Nov-07 20:03
wolfshad35-Nov-07 20:03 
QuestionYahoo mail Pin
mihksoft5-Nov-07 6:13
mihksoft5-Nov-07 6:13 
AnswerRe: Yahoo mail Pin
Judah Gabriel Himango5-Nov-07 7:13
sponsorJudah Gabriel Himango5-Nov-07 7:13 
QuestionC# and simple SOAP Pin
AssemblySoft5-Nov-07 6:00
AssemblySoft5-Nov-07 6:00 
Answercross-post Pin
led mike5-Nov-07 8:30
led mike5-Nov-07 8:30 
GeneralRe: cross-post Pin
AssemblySoft5-Nov-07 10:24
AssemblySoft5-Nov-07 10:24 
GeneralRe: cross-post Pin
led mike6-Nov-07 3:56
led mike6-Nov-07 3:56 
GeneralRe: cross-post Pin
AssemblySoft6-Nov-07 5:19
AssemblySoft6-Nov-07 5:19 
GeneralRe: cross-post Pin
led mike6-Nov-07 5:40
led mike6-Nov-07 5:40 
GeneralRe: cross-post Pin
AssemblySoft6-Nov-07 5:50
AssemblySoft6-Nov-07 5:50 
GeneralRe: cross-post Pin
led mike6-Nov-07 6:07
led mike6-Nov-07 6:07 
GeneralRe: cross-post Pin
AssemblySoft6-Nov-07 6:17
AssemblySoft6-Nov-07 6:17 
GeneralRe: cross-post Pin
led mike6-Nov-07 10:32
led mike6-Nov-07 10:32 
AnswerRe: C# and simple SOAP Pin
Ennis Ray Lynch, Jr.5-Nov-07 9:56
Ennis Ray Lynch, Jr.5-Nov-07 9:56 
QuestionSQL Error converting data type varchar to numeric Pin
ortaparmak5-Nov-07 5:30
ortaparmak5-Nov-07 5:30 
AnswerRe: SQL Error converting data type varchar to numeric Pin
Rob Philpott5-Nov-07 5:53
Rob Philpott5-Nov-07 5:53 
GeneralRe: SQL Error converting data type varchar to numeric Pin
ortaparmak5-Nov-07 7:13
ortaparmak5-Nov-07 7:13 
AnswerRe: SQL Error converting data type varchar to numeric Pin
snorkie5-Nov-07 5:56
professionalsnorkie5-Nov-07 5:56 
GeneralRe: SQL Error converting data type varchar to numeric Pin
ortaparmak5-Nov-07 7:06
ortaparmak5-Nov-07 7:06 
GeneralRe: SQL Error converting data type varchar to numeric Pin
snorkie5-Nov-07 7:12
professionalsnorkie5-Nov-07 7:12 
GeneralRe: SQL Error converting data type varchar to numeric Pin
ortaparmak5-Nov-07 7:41
ortaparmak5-Nov-07 7:41 
GeneralRe: SQL Error converting data type varchar to numeric Pin
snorkie6-Nov-07 5:13
professionalsnorkie6-Nov-07 5:13 
AnswerRe: SQL Error converting data type varchar to numeric Pin
Pete O'Hanlon5-Nov-07 9:38
mvePete O'Hanlon5-Nov-07 9:38 
The most apparent thing here is that you are using direct SQL to achieve this. You should use a stored procedure instead because it is better for you with regards to SQL Injection Attacks and also it takes care of the mappings for you.
CREATE PROCEDURE dbo.SaveJobs
@ID BIGINT OUT,
@ProjectID BIGINT,
@FileName NVARCHAR(255),
@SourceLanguage BIGINT, 
@TargetLanguage BIGINT, 
@Type BIGINT, 
@CharCount BIGINT, 
@PageCount DECIMAL(10,4), 
@ApplicableRate DECIMAL(10,4), 
@QuotedOn DATETIME
AS
INSERT INTO JOBS(ProjectID, FileName, SourceLanguage, TargetLanguage, Type, CharCount, PageCount, ApplicableRate, QuotedOn)
VALUES (
@ProjectID, 
@FileName, 
@SourceLanguage, 
@TargetLanguage, 
@Type, 
@CharCount, 
@PageCount, 
@ApplicableRate, 
@QuotedOn)

SET @ID = SCOPE_IDENTITY()
Then you create a SqlCommand in your C# and fill in your parameters with the relevant values.

Deja View - the feeling that you've seen this post before.

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.