Click here to Skip to main content
14,271,828 members
   

C#

 
AnswerRe: Split lines in a file Pin
OriginalGriff29-Mar-19 9:11
protectorOriginalGriff29-Mar-19 9:11 
QuestionException while trying reading a local file using online compiler Pin
Member 1420343029-Mar-19 6:28
memberMember 1420343029-Mar-19 6:28 
AnswerRe: Exception while trying reading a local file using online compiler Pin
OriginalGriff29-Mar-19 6:42
protectorOriginalGriff29-Mar-19 6:42 
GeneralRe: Exception while trying reading a local file using online compiler Pin
Member 1420343029-Mar-19 7:19
memberMember 1420343029-Mar-19 7:19 
GeneralRe: Exception while trying reading a local file using online compiler Pin
OriginalGriff29-Mar-19 7:23
protectorOriginalGriff29-Mar-19 7:23 
GeneralRe: Exception while trying reading a local file using online compiler Pin
Dave Kreskowiak29-Mar-19 9:44
mveDave Kreskowiak29-Mar-19 9:44 
GeneralRe: Exception while trying reading a local file using online compiler Pin
Member 1420343029-Mar-19 10:48
memberMember 1420343029-Mar-19 10:48 
QuestionGetting exception message "Incorrect syntax near '(' " in C# web app Pin
Member 1420265628-Mar-19 20:10
memberMember 1420265628-Mar-19 20:10 
I'm trying to send an update request to existing database in my local machine's sql server instance. Here's the code where I'm formatting the update request and also setting parameters for it:
<pre>
updCmd = new SqlCommand("UPDATE Networks(ID, NetworkName, DomainName, LastUpdatedBy, LastUpdatedAt)" +
" VALUES(@ID,@netName,@domName,@lstUpdtdBy,@lstUpdtdAt) WHERE ID=" + netWorkIDInt, myConnection);
updCmd.Parameters.AddWithValue("@ID", netWorkIDInt);
updCmd.Parameters.AddWithValue("@netName",netName);
updCmd.Parameters.AddWithValue("@domName",domName);
//updCmd.Parameters.AddWithValue("@crtdBy", networksCreatedBy);
updCmd.Parameters.AddWithValue("@lstUpdtdBy",lstUpdtdBy);
//updCmd.Parameters.AddWithValue("@crtdAt",networksCreatedAt);
updCmd.Parameters.AddWithValue("@lstUpdtdAt",DateTime.Now);
</pre>

I've tried more than a few different formatting variations but nothing so far has cleared up the error mentioned in the subject, which is what causes the application to consistently fail.
I would appreciate any help of suggestions, in trying to resolve this problem.

Thanks.

Henry
AnswerRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
GenJerDan28-Mar-19 20:58
memberGenJerDan28-Mar-19 20:58 
AnswerRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
OriginalGriff28-Mar-19 21:04
protectorOriginalGriff28-Mar-19 21:04 
AnswerRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
Luc Pattyn28-Mar-19 23:39
professionalLuc Pattyn28-Mar-19 23:39 
GeneralRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
OriginalGriff28-Mar-19 23:42
protectorOriginalGriff28-Mar-19 23:42 
GeneralRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
Luc Pattyn28-Mar-19 23:47
professionalLuc Pattyn28-Mar-19 23:47 
GeneralRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
GenJerDan29-Mar-19 1:39
memberGenJerDan29-Mar-19 1:39 
GeneralRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
Eddy Vluggen29-Mar-19 2:56
mveEddy Vluggen29-Mar-19 2:56 
QuestionDebugging + MSTest + Multiple Startup Project question Pin
Super Lloyd28-Mar-19 19:59
memberSuper Lloyd28-Mar-19 19:59 
AnswerRe: Debugging + MSTest + Multiple Startup Project question Pin
Super Lloyd1-Apr-19 14:04
memberSuper Lloyd1-Apr-19 14:04 
QuestionLooks like C# does not support Global Variables Pin
Brian_TheLion27-Mar-19 23:43
memberBrian_TheLion27-Mar-19 23:43 
AnswerRe: Looks like C# does not support Global Variables Pin
Richard MacCutchan27-Mar-19 23:46
protectorRichard MacCutchan27-Mar-19 23:46 
AnswerRe: Looks like C# does not support Global Variables Pin
OriginalGriff27-Mar-19 23:57
protectorOriginalGriff27-Mar-19 23:57 
GeneralRe: Looks like C# does not support Global Variables Pin
Richard MacCutchan28-Mar-19 0:08
protectorRichard MacCutchan28-Mar-19 0:08 
GeneralRe: Looks like C# does not support Global Variables Pin
Brian_TheLion28-Mar-19 0:09
memberBrian_TheLion28-Mar-19 0:09 
GeneralRe: Looks like C# does not support Global Variables Pin
OriginalGriff28-Mar-19 0:21
protectorOriginalGriff28-Mar-19 0:21 
GeneralRe: Looks like C# does not support Global Variables Pin
Brian_TheLion28-Mar-19 0:35
memberBrian_TheLion28-Mar-19 0:35 
GeneralRe: Looks like C# does not support Global Variables Pin
OriginalGriff28-Mar-19 0:42
protectorOriginalGriff28-Mar-19 0:42 

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.