Redshift ODBC driver AccessViolationException

When querying Redshift databases in a loop with e.g. multiple calls to odbc.ExecuteReader(), the ODBC driver starts to die at some moment in your hands and complains about an AccessViolationException.

The fix was simple but slow for me: I closed the connection after each iteration of the Redshift ODBC data – and then reopened the same connection before the next call to the ExecuteReader. I no longer encountered the AccessViolationException.



Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s