Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
AnswerRe: Open Source PDF VIewer in Winform Pin
Pete O'Hanlon28-Sep-15 21:35
mvePete O'Hanlon28-Sep-15 21:35 
GeneralRe: Open Source PDF VIewer in Winform Pin
Anthony Fernando28-Sep-15 21:53
professionalAnthony Fernando28-Sep-15 21:53 
AnswerRe: Open Source PDF VIewer in Winform Pin
Garth J Lancaster28-Sep-15 21:36
professionalGarth J Lancaster28-Sep-15 21:36 
GeneralRe: Open Source PDF VIewer in Winform Pin
Anthony Fernando28-Sep-15 21:54
professionalAnthony Fernando28-Sep-15 21:54 
GeneralRe: Open Source PDF VIewer in Winform Pin
Garth J Lancaster28-Sep-15 23:42
professionalGarth J Lancaster28-Sep-15 23:42 
SuggestionRe: Open Source PDF VIewer in Winform Pin
Richard Deeming29-Sep-15 2:18
mveRichard Deeming29-Sep-15 2:18 
GeneralRe: Open Source PDF VIewer in Winform Pin
Garth J Lancaster29-Sep-15 14:21
professionalGarth J Lancaster29-Sep-15 14:21 
AnswerRe: Open Source PDF VIewer in Winform Pin
Gerry Schmitz30-Sep-15 9:52
mveGerry Schmitz30-Sep-15 9:52 
Questionasync and await concept Pin
Anil Sharma198328-Sep-15 20:29
professionalAnil Sharma198328-Sep-15 20:29 
AnswerRe: async and await concept Pin
Pete O'Hanlon28-Sep-15 21:05
mvePete O'Hanlon28-Sep-15 21:05 
GeneralRe: async and await concept Pin
Anil Sharma198328-Sep-15 21:13
professionalAnil Sharma198328-Sep-15 21:13 
GeneralRe: async and await concept Pin
Pete O'Hanlon28-Sep-15 21:16
mvePete O'Hanlon28-Sep-15 21:16 
GeneralRe: async and await concept Pin
Anil Sharma198328-Sep-15 21:26
professionalAnil Sharma198328-Sep-15 21:26 
AnswerRe: async and await concept Pin
Agent__00728-Sep-15 23:19
professionalAgent__00728-Sep-15 23:19 
AnswerRe: async and await concept Pin
F-ES Sitecore29-Sep-15 1:02
professionalF-ES Sitecore29-Sep-15 1:02 
SuggestionRe: async and await concept Pin
Richard Deeming29-Sep-15 2:14
mveRichard Deeming29-Sep-15 2:14 
Questiongrid control, tile view Pin
Member 1201862628-Sep-15 20:00
Member 1201862628-Sep-15 20:00 
AnswerRe: grid control, tile view Pin
OriginalGriff28-Sep-15 20:11
mveOriginalGriff28-Sep-15 20:11 
QuestionWhy can I save the error information into the table of SQL server ? Pin
Member 245846728-Sep-15 17:40
Member 245846728-Sep-15 17:40 
AnswerRe: Why can I save the error information into the table of SQL server ? Pin
Wendelius28-Sep-15 17:57
mentorWendelius28-Sep-15 17:57 
You didn't post the error message so there's no way of knowing what err you actually encounter.

However, there are some issues with the code:

  • The update statement TABERRORINFO, the the username is concatenated into the SQL statement while all other values are passed as parameters. The username should also be a parameter
  • Does the query update a row. When the ExecuteNonQUery is called, check the return value and see if it is 0 or 1 (or something else). If it's 0 there is no row to update. So the code should be something like
    C#
    int rowsAffected = cmd.ExecuteNonQuery();
    if (rowsAffected != 1) {
       // inform user etc...
    }
    ...

  • Instead of using a single connection for all statements I'd suggest wrapping the operations inside a using block

  • It looks you may store a date in a string column. If that is the case I'd suggest using a datetime data type for dates. This will remove a lot of unnecessary complexity in the code.

GeneralRe: Why can I save the error information into the table of SQL server ? Pin
Member 245846729-Sep-15 17:36
Member 245846729-Sep-15 17:36 
GeneralRe: Why can I save the error information into the table of SQL server ? Pin
Wendelius29-Sep-15 18:15
mentorWendelius29-Sep-15 18:15 
GeneralRe: Why can I save the error information into the table of SQL server ? Pin
Member 24584672-Oct-15 2:56
Member 24584672-Oct-15 2:56 
QuestionSitemapnode(breadcrumb) value changes with multiple users Pin
nitin_ion28-Sep-15 4:09
nitin_ion28-Sep-15 4:09 
AnswerRe: Sitemapnode(breadcrumb) value changes with multiple users Pin
Pete O'Hanlon28-Sep-15 4:58
mvePete O'Hanlon28-Sep-15 4:58 

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.