1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Authorization on executing query on Progress OpenEdge with C#

Discussão em 'StackOverflow' iniciado por fdantas, Janeiro 2, 2018.

  1. fdantas

    fdantas Administrator Moderador

    I have performed all the processes for installing and configuring the Progress OpenEdge version 11.7 database. I configured the DSN with username and password and to access the database I created and everything connected correctly.

    After performing the connection to the database, I get the following error message when executing a query to get data:

    Error: ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Access denied (Authorization failed) (7512)

    I have accessed OpenEdge Management to guarantee all permissions for my user as shown below, but I still get this error message.

    [​IMG]

    Code:

    public static bool InsertItem(string itCodigo, string descItem, string um)
    {
    bool ret = false;
    string connectString = "DSN=DSN-Name;uid=renan;pwd=*****;host=localhost;port=XXXX;db=DatabaseName;";

    using (OdbcConnection connection = new OdbcConnection(connectString))
    {
    try
    {
    connection.Open();
    IDbCommand dbcmd = connection.CreateCommand();
    string sqlstr = "select * from Hipolabor.pub.Item";
    dbcmd.CommandText = sqlstr;

    using (IDataReader rdr = dbcmd.ExecuteReader())
    {
    var b = rdr.Read();
    }
    }
    catch (Exception e)
    {
    return false;
    }
    finally
    {
    connection.Close();
    }
    }
    return ret;
    }


    What could be wrong?

    Continue reading...

Compartilhe esta Página