User Profile

Collapse

Profile Sidebar

Collapse
DeafSmith
DeafSmith
Last Activity: Nov 30 '15, 07:13 PM
Joined: Aug 21 '15
Location: Tyler, Texas, USA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Can PgSqlException and NpgsqlException be used interchangeably?

    I have some sophisticated error trapping using NpgsqlException .

    But many of my SQL reads are in Postgresql and use PgSqlException for error trapping.

    So, instead of using:
    Code:
    catch (PgSqlException ex)
                { MessageBox.Show(ex.ToString()); }
    I want to use
    Code:
    catch (NpgsqlException ex)
         {
          string errorx = UsefulTools.error_list(ex.Code);
          MessageBox.Show("Error
    ...
    See more | Go to post
    Last edited by Rabbit; Nov 4 '15, 07:59 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

  • Read just one row (primary key) and display each column of the row

    I am using Postgresql in VS 2013 and C#.

    I use this for the reading of just one row by primary key.

    string p has the users id it must look for in the table.

    Code:
     cn.Open();
     selectSql = "SELECT user_id,user_name,user_password,user_administrator FROM userlogon WHERE user_id ='" + p + "'";
     cmd.CommandText = selectSql;
     NpgsqlDataAdapter da = new NpgsqlDataAdapter(selectSql,
    ...
    See more | Go to post

  • Ok, figured it out. Apostrophe is the answer.
    That is double apostrophe.This will do it.

    Code:
    string xfile_path = "c:/foldera/folderb/The Hitchhiker's Guide to the Galaxy.png"
    string x = "\'";                   // what we want replaced
    if (xfile_path.ToString().IndexOfAny(new char[] { '\'' }) > -1)    
        {
          //* so we fix it
          string tests = xfile_path.ToString();
    ...
    See more | Go to post
    Last edited by Rabbit; Sep 4 '15, 09:48 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

    Leave a comment:


  • Pathname to be put into table has single quote as part of name

    Part of a table I have requires the pathname to a photostat of the check to placed into a field.

    Example, c:/foldera/folderb/The Hitchhiker's Guide to the Galaxy.png

    Well the ' in the name gives me fits. Error 42703.. I tried putting the string in quotes, "\"", but still a no-go.

    Any ideas?

    Thanks.
    See more | Go to post

  • DeafSmith
    replied to Dividing Project in Multiple Executables
    You will need to have a team leader. The leader will coordinate between those doing different parts of the project.

    You need to define database first, what functions will be needed on the project, and how they relate to each other.

    Then give each person a part.

    The team leader will then, very often, check to see if the people are following their roles. Have meetings often with all of them team and if any questions...
    See more | Go to post

    Leave a comment:


  • DeafSmith
    replied to Link between two forms in windows forms.
    You can use a childform and pass data back and forth.

    Just google it like 'VS 2013 childform pass data' and it's all there!

    I use it often.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...