Click here to Skip to main content
15,791,602 members
Home / Discussions / C#
   

C#

 
GeneralRe: Client 2 Client File Encryption Pin
The Junior28-Feb-18 2:51
The Junior28-Feb-18 2:51 
AnswerRe: Client 2 Client File Encryption Pin
Gerry Schmitz28-Feb-18 8:15
mveGerry Schmitz28-Feb-18 8:15 
QuestionRemove duplicates Pin
Shankar M27-Feb-18 21:14
Shankar M27-Feb-18 21:14 
AnswerRe: Remove duplicates Pin
OriginalGriff27-Feb-18 22:04
mvaOriginalGriff27-Feb-18 22:04 
GeneralRe: Remove duplicates Pin
Shankar M27-Feb-18 23:14
Shankar M27-Feb-18 23:14 
GeneralRe: Remove duplicates Pin
OriginalGriff27-Feb-18 23:26
mvaOriginalGriff27-Feb-18 23:26 
AnswerRe: Remove duplicates Pin
Bernhard Hiller27-Feb-18 22:22
Bernhard Hiller27-Feb-18 22:22 
GeneralRe: Remove duplicates Pin
Shankar M27-Feb-18 22:55
Shankar M27-Feb-18 22:55 
Thanks,

after command.ExecuteNonQuery() this line I am getting error called
a local variable name connection is already defined in this scope
and I checked my code only once I used the variable connection. kindly help me on this.


For the below code

SqlCommand command = new SqlCommand("truncate table clean"), connection);
connection.Open();
command.ExecuteNonQuery();
connection.Close();
MessageBox.Show("Cleared All data");

I am getting error

a local variable name connection is already defined in this scope



If the sql commanand to
SqlCommand command = new SqlCommand("truncate table clean)", connection);


getting an error
Incorrect syntax near ')'.

GeneralRe: Remove duplicates Pin
Pete O'Hanlon28-Feb-18 1:25
subeditorPete O'Hanlon28-Feb-18 1:25 
GeneralRe: Remove duplicates Pin
Shankar M27-Feb-18 23:14
Shankar M27-Feb-18 23:14 
QuestionAutomatic unit tests Pin
Hila Berger27-Feb-18 1:01
Hila Berger27-Feb-18 1:01 
AnswerRe: Automatic unit tests Pin
Pete O'Hanlon27-Feb-18 2:27
subeditorPete O'Hanlon27-Feb-18 2:27 
GeneralRe: Automatic unit tests Pin
Hila Berger1-Mar-18 1:10
Hila Berger1-Mar-18 1:10 
GeneralRe: Automatic unit tests Pin
Pete O'Hanlon1-Mar-18 1:32
subeditorPete O'Hanlon1-Mar-18 1:32 
AnswerRe: Automatic unit tests Pin
Eddy Vluggen27-Feb-18 3:02
professionalEddy Vluggen27-Feb-18 3:02 
GeneralRe: Automatic unit tests Pin
Hila Berger1-Mar-18 1:12
Hila Berger1-Mar-18 1:12 
GeneralRe: Automatic unit tests Pin
Eddy Vluggen1-Mar-18 1:28
professionalEddy Vluggen1-Mar-18 1:28 
AnswerRe: Automatic unit tests Pin
Bohdan Stupak27-Feb-18 5:37
professionalBohdan Stupak27-Feb-18 5:37 
QuestionFinally! I found a valid use for the ref keyword Pin
Foothill26-Feb-18 11:57
professionalFoothill26-Feb-18 11:57 
AnswerRe: Finally! I found a valid use for the ref keyword Pin
Richard Deeming26-Feb-18 12:57
mveRichard Deeming26-Feb-18 12:57 
GeneralRe: Finally! I found a valid use for the ref keyword Pin
Foothill27-Feb-18 4:08
professionalFoothill27-Feb-18 4:08 
GeneralRe: Finally! I found a valid use for the ref keyword Pin
Eddy Vluggen27-Feb-18 4:12
professionalEddy Vluggen27-Feb-18 4:12 
GeneralRe: Finally! I found a valid use for the ref keyword Pin
Foothill27-Feb-18 4:31
professionalFoothill27-Feb-18 4:31 
GeneralRe: Finally! I found a valid use for the ref keyword Pin
Eddy Vluggen27-Feb-18 4:42
professionalEddy Vluggen27-Feb-18 4:42 
GeneralRe: Finally! I found a valid use for the ref keyword Pin
Eddy Vluggen27-Feb-18 6:23
professionalEddy Vluggen27-Feb-18 6:23 

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.