Invalid attribute in connection string: No memory

Posted by Admin on 06-Apr-2009 10:35

I'm not sure what's going on here.  We've written some basic code to access a db through an ODBC connection using the OpenEdge driver (10.0B).  This code was working fine for a time, but then suddenly stopped working.  I also have a ODBC System DSN setup to this DB that was also working, but now returns a similar error.  When I click the Test Connection button in the ODBC Administrator for this connection I get:

[DataDirect][ODBC OPENEDGE driver]Invalid attribute in connection string: Description.[DataDirect][ODBC OPENEDGE driver][OPENEDGE]No Memory

I've tried rebooting my client, and have plenty of free memory here, so I don't think that's the issue.  Is it possible that it is actually connecting and then getting an error and this an error coming from the server?

Not sure what's up here.  Any help would be appreciated.

All Replies

Posted by kevin_saunders on 07-Apr-2009 01:22

Are there any messages relating to the connection attempt in the databasae lg file?

Posted by Admin on 07-Apr-2009 06:32

Another thing to watch is connection pooling, dead connections (eg corrupt connection due to a server side error executing sql) can be returned to the pool and re-issued to another requesting client.

Posted by ubicker on 07-Apr-2009 06:44

Hi,

is this happening on all of your clients? Or just one.

What happens if you setup a new connection Profile? Same Error? did you test the odbc-driver on a different db?

Greetings

Posted by Admin on 07-Apr-2009 09:29

I don't believe that I should be having any resource leaks from my code, as I have both the connection and command wrapped in using blocks.  My code currently looks like this:

using (OdbcConnection connection = new OdbcConnection(myConnectionString))
{
    string commandText = // my command goes here;
    using (OdbcCommand command = new OdbcCommand(commandText, connection))
    {
        connection.Open();
        using (OdbcDataReader odbcDataReader = command.ExecuteReader())
        {
             // The work is done here.
        }
    }
}

I think this should be safe code, in terms of insuring that all resources are freed up (though I would be glad to have someone correct me).

I'll try to contact the DBA to see if they can spot if there are any dead/bad connections that can be culled and recycled.

Posted by Admin on 07-Apr-2009 09:51

Apparently, the error message is a bit of a red herring.  I was thinking it wasn't my client machine since I'd just rebooted, and had plenty of free memory when I was getting the "No Memory" error.  No such luck.  Changing my DSN (which currently gives the No Memory error) to a completely random non-existing machine gives the same error, so I must have some kind of problem with my driver.  I'll try uninstalling and reinstalling...though I'm a bit worried about how this could have suddenly occured.

Thank you very much for your suggestions.  (One of the suggestions had me thinking and got me looking down this path.)

This thread is closed