locked
connect to progress database using odbc driver RRS feed

  • Question

  • User-1972939758 posted

    I have odbc progress driver (4.1 32 bit progress sql92 v9.1E) by datadirect. I am trying to connect to progress database through C# but get the follwing error.

    ERROR [HYC00] [DataDirect][ODBC PROGRESS driver]Optional feature not implemented.
    ERROR [HY000] [DataDirect][ODBC PROGRESS driver][PROGRESS]No Data
    ERROR [IM006] [DataDirect][ODBC PROGRESS driver]Driver's SQLSetConnectAttr failed.
    ERROR [HYC00] [DataDirect][ODBC PROGRESS driver]Optional feature not implemented.
    ERROR [HY000] [DataDirect][ODBC PROGRESS driver][PROGRESS]No Data
    ERROR [IM006] [DataDirect][ODBC PROGRESS driver]Driver's SQLSetConnectAttr failed.

    Following is my C# code

    OdbcConnection connection = new OdbcConnection();
            connection.ConnectionString ="DSN=XXX;HOST=xx.xxx.xxx.xx;DB=xxxx;UID=xxxxx;PWD=xxxx;PORT=2500;";
            connection.Open();
                }

    Can anyone please help??

    Thursday, September 6, 2012 11:11 PM

All replies

  • User269602965 posted
    example
    study connection strings for ODBC google "ODBC connection strings"
    pass the conn string since it will be used over and over in application
    static private void InsertRow(string connStr)
    		{
    			string strODBCquery = 
                    "INSERT INTO BIRDS (BirdID, NameBird, AOUNumber) Values(1, 'Harris Sparrow', '5580')";
    			OdbcCommand cmd = new OdbcCommand(strODBCquery);
    			using (OdbcConnection conn = new OdbcConnection(connStr))
    			{
    				cmd.Connection = conn;
    				conn.Open();
    				cmd.ExecuteNonQuery();
    			}
    		}

    Friday, September 7, 2012 11:35 AM
  • User-1972939758 posted

    example
    study connection strings for ODBC google "ODBC connection strings"
    pass the conn string since it will be used over and over in application
    static private void InsertRow(string connStr)                  {                          string strODBCquery =                   "INSERT INTO BIRDS (BirdID, NameBird, AOUNumber) Values(1, 'Harris Sparrow', '5580')";                          OdbcCommand cmd = new OdbcCommand(strODBCquery);                          using (OdbcConnection conn = new OdbcConnection(connStr))                          {                                  cmd.Connection = conn;                                  conn.Open();                                  cmd.ExecuteNonQuery();                          }                  }

    Thank you for your reply.

    What different did I do in my code? My code fails at connection.open(). Did I miss anything? Did not get what were you pointing at? Could you please elaborate?

    Thank you

    Tuesday, September 11, 2012 11:00 AM