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

C#

 
GeneralRe: showing form from bottom wth timer Pin
eng.iris16-Sep-13 10:02
eng.iris16-Sep-13 10:02 
GeneralRe: showing form from bottom wth timer Pin
eng.iris17-Sep-13 7:54
eng.iris17-Sep-13 7:54 
AnswerRe: showing form from bottom wth timer Pin
Midnight Ahri17-Sep-13 17:26
Midnight Ahri17-Sep-13 17:26 
GeneralRe: showing form from bottom wth timer Pin
eng.iris18-Sep-13 7:13
eng.iris18-Sep-13 7:13 
Questionwpf backgroundworker, execution of processes one after another Pin
Member 974759714-Sep-13 19:55
Member 974759714-Sep-13 19:55 
AnswerRe: wpf backgroundworker, execution of processes one after another Pin
Abhinav S14-Sep-13 22:18
Abhinav S14-Sep-13 22:18 
QuestionSave Images in SQl Server Pin
sigridslima14-Sep-13 17:13
sigridslima14-Sep-13 17:13 
GeneralRe: Save Images in SQl Server Pin
PIEBALDconsult14-Sep-13 18:12
mvePIEBALDconsult14-Sep-13 18:12 
I'm not going to try to read all that and try to figure out what you're doing wrong, but I'll point out two bad things that jump out at me:

dal.ComandoSQl("UPDATE tbFoto set descricao='" + Descricao + "', foto='" + Foto + "', foto1='" + Foto1 + "'where id= " + Id + "");

Don't use concatenation to build a query; use a parameterized query (this may actually be the whole problem).


catch (Exception ex)<br />
{<br />
throw ex;<br />
}


This is actually three problems in one.
Try to catch a specific Exception rather than all Exceptions.
Don't catch and rethrow without doing anything else.
If you rethrow (after doing something else), then just use throw, not throw ex.

In this case, you can remove the entire try/catch.
GeneralRe: Save Images in SQl Server Pin
sigridslima15-Sep-13 14:57
sigridslima15-Sep-13 14:57 
GeneralRe: Save Images in SQl Server Pin
PIEBALDconsult15-Sep-13 16:26
mvePIEBALDconsult15-Sep-13 16:26 
GeneralRe: Save Images in SQl Server Pin
sigridslima16-Sep-13 2:55
sigridslima16-Sep-13 2:55 
GeneralRe: Save Images in SQl Server Pin
PIEBALDconsult16-Sep-13 3:47
mvePIEBALDconsult16-Sep-13 3:47 
GeneralRe: Save Images in SQl Server Pin
sigridslima16-Sep-13 5:21
sigridslima16-Sep-13 5:21 
GeneralRe: Save Images in SQl Server Pin
PIEBALDconsult16-Sep-13 13:37
mvePIEBALDconsult16-Sep-13 13:37 
GeneralRe: Save Images in SQl Server Pin
sigridslima16-Sep-13 14:35
sigridslima16-Sep-13 14:35 
AnswerRe: Save Images in SQl Server Pin
OriginalGriff14-Sep-13 22:17
mveOriginalGriff14-Sep-13 22:17 
QuestionC# Application - SQL Syntax Problem Pin
Member 1026694314-Sep-13 16:34
Member 1026694314-Sep-13 16:34 
AnswerRe: C# Application - SQL Syntax Problem Pin
PIEBALDconsult14-Sep-13 17:17
mvePIEBALDconsult14-Sep-13 17:17 
GeneralRe: C# Application - SQL Syntax Problem Pin
Member 1026694315-Sep-13 11:03
Member 1026694315-Sep-13 11:03 
AnswerRe: C# Application - SQL Syntax Problem Pin
Dave Kreskowiak14-Sep-13 19:12
mveDave Kreskowiak14-Sep-13 19:12 
QuestionGet the value of RepositoryItemPictureEdit in GridControl Pin
nhanlaptrinh14-Sep-13 9:26
nhanlaptrinh14-Sep-13 9:26 
AnswerRe: Get the value of RepositoryItemPictureEdit in GridControl Pin
Richard MacCutchan14-Sep-13 21:45
mveRichard MacCutchan14-Sep-13 21:45 
QuestionDLLIMPORT - SENDMESSAGE Pin
M Riaz Bashir14-Sep-13 5:01
M Riaz Bashir14-Sep-13 5:01 
AnswerRe: DLLIMPORT - SENDMESSAGE Pin
Richard MacCutchan14-Sep-13 5:42
mveRichard MacCutchan14-Sep-13 5:42 
AnswerRe: DLLIMPORT - SENDMESSAGE Pin
TnTinMn14-Sep-13 8:39
TnTinMn14-Sep-13 8:39 

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.