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.

 

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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