Click here to Skip to main content
15,888,803 members
Home / Discussions / C#
   

C#

 
AnswerRe: Visual Studio skips compiling files based on date/time Pin
Dave Kreskowiak18-Apr-16 12:20
mveDave Kreskowiak18-Apr-16 12:20 
GeneralRe: Visual Studio skips compiling files based on date/time Pin
clapclap18-Apr-16 12:22
clapclap18-Apr-16 12:22 
GeneralRe: Visual Studio skips compiling files based on date/time Pin
Dave Kreskowiak18-Apr-16 12:29
mveDave Kreskowiak18-Apr-16 12:29 
AnswerRe: Visual Studio skips compiling files based on date/time Pin
Philippe Mori18-Apr-16 12:28
Philippe Mori18-Apr-16 12:28 
QuestionI can not log in in my own C# Project in my Compiuter Pin
Member 1228884018-Apr-16 5:20
Member 1228884018-Apr-16 5:20 
AnswerRe: I can not log in in my own C# Project in my Compiuter Pin
Simon_Whale18-Apr-16 5:32
Simon_Whale18-Apr-16 5:32 
AnswerRe: I can not log in in my own C# Project in my Compiuter Pin
Sascha Lefèvre18-Apr-16 5:33
professionalSascha Lefèvre18-Apr-16 5:33 
AnswerRe: I can not log in in my own C# Project in my Compiuter Pin
OriginalGriff18-Apr-16 5:37
mveOriginalGriff18-Apr-16 5:37 
For starters, don't do it like that!
There are so many things wrong here it's difficult to know where to start!
Let's go with the really big one: SQL Injection.
Do not concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Use Parametrized queries instead. See here: xkcd: Exploits of a Mom[^]

The second one is nearly as big: Never store passwords in clear text - it is a major security risk. There is some information on how to do it here: Password Storage: How to do it.[^].
See here: http://www.commitstrip.com/wp-content/uploads/2013/09/Strips-Erreur-au-pilori-001-650-finalenglish.jpg[^]

Next, don't hardcode connection strings. They make it very difficult to test your code before you release it to production! Use settings or configuration files instead.

Finally, never attach a DB: it creates a local copy of the SQL Server instance in the Express edition only - it will fail in production.

And then - when you have fixed that lot - look at your connection string itself.
Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your config file.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

AnswerRe: I can not log in in my own C# Project in my Compiuter Pin
Patrice T18-Apr-16 5:41
mvePatrice T18-Apr-16 5:41 
QuestionRe: I can not log in in my own C# Project in my Compiuter Pin
Eddy Vluggen18-Apr-16 12:25
professionalEddy Vluggen18-Apr-16 12:25 
Questiondoubt Pin
Member 1243170118-Apr-16 2:54
Member 1243170118-Apr-16 2:54 
AnswerRe: doubt Pin
Richard MacCutchan18-Apr-16 3:09
mveRichard MacCutchan18-Apr-16 3:09 
AnswerRe: doubt Pin
OriginalGriff18-Apr-16 3:14
mveOriginalGriff18-Apr-16 3:14 
GeneralRe: doubt Pin
V.19-Apr-16 1:38
professionalV.19-Apr-16 1:38 
GeneralRe: doubt Pin
OriginalGriff19-Apr-16 2:47
mveOriginalGriff19-Apr-16 2:47 
GeneralRe: doubt Pin
V.19-Apr-16 3:33
professionalV.19-Apr-16 3:33 
QuestionRe: doubt Pin
Eddy Vluggen18-Apr-16 4:33
professionalEddy Vluggen18-Apr-16 4:33 
AnswerRe: doubt Pin
Patrice T18-Apr-16 5:38
mvePatrice T18-Apr-16 5:38 
QuestionRoslyn compiler Pin
V.18-Apr-16 2:27
professionalV.18-Apr-16 2:27 
AnswerRe: Roslyn compiler Pin
Richard Deeming18-Apr-16 2:42
mveRichard Deeming18-Apr-16 2:42 
QuestionInsert rows c# Pin
Bougarra17-Apr-16 23:11
Bougarra17-Apr-16 23:11 
AnswerRe: Insert rows c# Pin
Pete O'Hanlon17-Apr-16 23:55
mvePete O'Hanlon17-Apr-16 23:55 
QuestionForm disappearing Pin
Member 238990017-Apr-16 0:02
Member 238990017-Apr-16 0:02 
AnswerRe: Form disappearing Pin
OriginalGriff17-Apr-16 0:36
mveOriginalGriff17-Apr-16 0:36 
GeneralRe: Form disappearing Pin
Member 238990017-Apr-16 0:46
Member 238990017-Apr-16 0:46 

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.