pythonodbcpyodbcuniverseunidata

Rocket UniData/UniVerse: ODBC Unable to allocate sufficient memory


Whenever I tried using pyodbc to connect to a Rocket UniData/UniVerse data I kept running into the error:

pyodbc.Error: ('00000', '[00000] [Rocket U2][U2ODBC][0302810]Unable to allocate sufficient memory! (0) (SQLDriverConnect); [00000] [Rocket U2][U2ODBC][0400182]Connection not open. (0)')

My code looks as follows:

import pyodbc 


conStr = 'Driver={U2 64-Bit ODBC};Database=myDb;Server=localhost;UID=user;PWD=password'
conn = pyodbc.connect(conStr)
cursor = conn.cursor()

Solution

  • I actually found that the simplest way to fix this error was to create a System DSN and then changed my code to the following:

    import pyodbc 
    
    conStr = 'DSN=myTestDsn;UID=user;PWD=password'
    conn = pyodbc.connect(conStr)