Click here to Skip to main content
15,889,858 members
Home / Discussions / C#
   

C#

 
QuestionRe: code for androide xml analyser Pin
Stefto7-Apr-15 22:56
professionalStefto7-Apr-15 22:56 
AnswerRe: code for androide xml analyser Pin
Simon_Whale7-Apr-15 23:19
Simon_Whale7-Apr-15 23:19 
QuestionAudio Visualisation For RGB STRIP Via C# Pin
Marek Gamelaster Kraus7-Apr-15 9:00
Marek Gamelaster Kraus7-Apr-15 9:00 
AnswerRe: Audio Visualisation For RGB STRIP Via C# Pin
V.7-Apr-15 20:03
professionalV.7-Apr-15 20:03 
GeneralRe: Audio Visualisation For RGB STRIP Via C# Pin
Marek Gamelaster Kraus8-Apr-15 3:11
Marek Gamelaster Kraus8-Apr-15 3:11 
QuestionEmpty path name is not legal - image upload Pin
DPaul19947-Apr-15 6:49
DPaul19947-Apr-15 6:49 
AnswerRe: Empty path name is not legal - image upload Pin
Eddy Vluggen7-Apr-15 8:03
professionalEddy Vluggen7-Apr-15 8:03 
AnswerRe: Empty path name is not legal - image upload Pin
OriginalGriff7-Apr-15 8:05
mveOriginalGriff7-Apr-15 8:05 
Start by assuming TextBox5 contains no text, and your error should appear - so the most likely thing is that your user pressed Cancel instead of selecting an image, or that code was never called. So check - if it's empty, don't continue.

But...there are other problems here, from the trivial:
Why do you think you have call ToString on a string? What do you expect that to do?
C#
string picLoc = dlg.FileName.ToString();


To the very serious: 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.
You are clearly aware of the existence of parameterized queries and how to use them, but you leave your code wide open to anyone with a keyboard and your application anyway? Why? Do you not like your data?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: Empty path name is not legal - image upload Pin
DPaul19947-Apr-15 8:49
DPaul19947-Apr-15 8:49 
GeneralRe: Empty path name is not legal - image upload Pin
OriginalGriff8-Apr-15 0:18
mveOriginalGriff8-Apr-15 0:18 
GeneralRe: Empty path name is not legal - image upload Pin
DPaul19949-Apr-15 4:09
DPaul19949-Apr-15 4:09 
QuestionSend SMS by using GSM dongle Pin
Member 115873477-Apr-15 5:35
Member 115873477-Apr-15 5:35 
AnswerRe: Send SMS by using GSM dongle Pin
Richard MacCutchan7-Apr-15 5:36
mveRichard MacCutchan7-Apr-15 5:36 
AnswerRe: Send SMS by using GSM dongle Pin
Raj Mouli7-Apr-15 20:47
Raj Mouli7-Apr-15 20:47 
QuestionQuery and modify remote host (Linux\Unix) Pin
elza637-Apr-15 5:08
elza637-Apr-15 5:08 
AnswerRe: Query and modify remote host (Linux\Unix) Pin
Richard MacCutchan7-Apr-15 5:35
mveRichard MacCutchan7-Apr-15 5:35 
AnswerRe: Query and modify remote host (Linux\Unix) Pin
Eddy Vluggen7-Apr-15 5:39
professionalEddy Vluggen7-Apr-15 5:39 
GeneralRe: Query and modify remote host (Linux\Unix) Pin
elza6310-Apr-15 3:35
elza6310-Apr-15 3:35 
GeneralRe: Query and modify remote host (Linux\Unix) Pin
Eddy Vluggen10-Apr-15 8:06
professionalEddy Vluggen10-Apr-15 8:06 
QuestionEntity framework in C# MVC Pin
Dolly Nimavat7-Apr-15 0:42
Dolly Nimavat7-Apr-15 0:42 
AnswerRe: Entity framework in C# MVC Pin
Sascha Lefèvre7-Apr-15 1:00
professionalSascha Lefèvre7-Apr-15 1:00 
GeneralRe: Entity framework in C# MVC Pin
Pete O'Hanlon7-Apr-15 1:36
mvePete O'Hanlon7-Apr-15 1:36 
GeneralRe: Entity framework in C# MVC Pin
Sascha Lefèvre7-Apr-15 1:47
professionalSascha Lefèvre7-Apr-15 1:47 
AnswerRe: Entity framework in C# MVC Pin
Pete O'Hanlon7-Apr-15 1:37
mvePete O'Hanlon7-Apr-15 1:37 
AnswerRe: Entity framework in C# MVC Pin
Nathan Minier8-Apr-15 2:25
professionalNathan Minier8-Apr-15 2:25 

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.