[Stackoverflow] [Progress OpenEdge ABL] Authorization on executing query on Progress OpenEdge with C#

  • Thread starter Renan Prológica
  • Start date
Status
Not open for further replies.
R

Renan Prológica

Guest
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.



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...
 
Status
Not open for further replies.
Top