Click here to Skip to main content
15,891,431 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: One button submit that handles the work with the database Pin
Dave Kreskowiak19-Dec-13 9:29
mveDave Kreskowiak19-Dec-13 9:29 
Questionsyntax error while updating a record Pin
Member 1038849418-Dec-13 3:07
Member 1038849418-Dec-13 3:07 
AnswerRe: syntax error while updating a record Pin
Pete O'Hanlon18-Dec-13 3:39
mvePete O'Hanlon18-Dec-13 3:39 
GeneralRe: syntax error while updating a record Pin
Member 1038849418-Dec-13 3:57
Member 1038849418-Dec-13 3:57 
GeneralRe: syntax error while updating a record Pin
Pete O'Hanlon18-Dec-13 4:00
mvePete O'Hanlon18-Dec-13 4:00 
GeneralRe: syntax error while updating a record Pin
Member 1038849418-Dec-13 4:03
Member 1038849418-Dec-13 4:03 
GeneralRe: syntax error while updating a record Pin
Pete O'Hanlon18-Dec-13 4:10
mvePete O'Hanlon18-Dec-13 4:10 
GeneralRe: syntax error while updating a record Pin
Richard Deeming18-Dec-13 4:13
mveRichard Deeming18-Dec-13 4:13 
You're mixing the syntax for the INSERT[^] and UPDATE[^] statements.

If you want to insert a new record, the query should be:
SQL
INSERT INTO tblcustomer 
(
   [ID],
   [Name],
   [Email],
   [Address],
   [DeptID]
) 
VALUES 
(
   @ID, 
   @Name, 
   @Email, 
   @Address, 
   @DeptID
)


If you want to update an existing record, the query should be:
SQL
UPDATE 
   tblcustomer 
SET 
   ID = @ID,
   Name = @Name,
   Email = @Email,
   Address = @Address,
   DeptID = @DeptID
WHERE
   Serial = @Serial

(You would also need to add the @Serial parameter to the command.)



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: syntax error while updating a record Pin
Member 1038849418-Dec-13 4:24
Member 1038849418-Dec-13 4:24 
GeneralRe: syntax error while updating a record Pin
Pete O'Hanlon18-Dec-13 4:38
mvePete O'Hanlon18-Dec-13 4:38 
GeneralRe: syntax error while updating a record Pin
Richard Deeming18-Dec-13 5:02
mveRichard Deeming18-Dec-13 5:02 
JokeRe: syntax error while updating a record Pin
Pete O'Hanlon18-Dec-13 5:07
mvePete O'Hanlon18-Dec-13 5:07 
GeneralRe: syntax error while updating a record Pin
Member 1038849418-Dec-13 21:22
Member 1038849418-Dec-13 21:22 
AnswerRe: syntax error while updating a record Pin
Chris Quinn18-Dec-13 4:18
Chris Quinn18-Dec-13 4:18 
GeneralRe: syntax error while updating a record Pin
Member 1038849418-Dec-13 4:27
Member 1038849418-Dec-13 4:27 
QuestionVS2010 project referencing my .net 4.5 dll Pin
Bruno Leclerc III13-Dec-13 19:30
Bruno Leclerc III13-Dec-13 19:30 
AnswerRe: VS2010 project referencing my .net 4.5 dll Pin
Pete O'Hanlon13-Dec-13 20:52
mvePete O'Hanlon13-Dec-13 20:52 
AnswerRe: VS2010 project referencing my .net 4.5 dll Pin
Abhinav S13-Dec-13 21:51
Abhinav S13-Dec-13 21:51 
QuestionCould not load type 'Google.Apis.Requests.IErrorResponseHandler' from assembly 'Google.Apis' Pin
zish7912-Dec-13 0:55
zish7912-Dec-13 0:55 
AnswerRe: Could not load type 'Google.Apis.Requests.IErrorResponseHandler' from assembly 'Google.Apis' Pin
Pete O'Hanlon12-Dec-13 1:19
mvePete O'Hanlon12-Dec-13 1:19 
SuggestionRe: Could not load type 'Google.Apis.Requests.IErrorResponseHandler' from assembly 'Google.Apis' Pin
thatraja12-Dec-13 3:31
professionalthatraja12-Dec-13 3:31 
QuestionMessage Closed Pin
10-Dec-13 2:42
Member 1045722310-Dec-13 2:42 
AnswerRe: Crystal Reports Pin
thatraja10-Dec-13 2:52
professionalthatraja10-Dec-13 2:52 
QuestionProgramming keyboard and mouse actions Pin
wyjohnson8-Dec-13 8:39
wyjohnson8-Dec-13 8:39 
AnswerRe: Programming keyboard and mouse actions Pin
Pete O'Hanlon8-Dec-13 23:06
mvePete O'Hanlon8-Dec-13 23:06 

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.