This is a really nebulous error that I can't seem to get a lot of context for so please ask any questions that might help clarify. I'll try to give you as much context as I can.

I'm currently creating a whole bunch of insert statements for mysql using a comma separated list of parantheses delineated values (i.e. `insert into table (a, b, c) values (1,2,3),(4,5,6),(7,8,9);`) I'm creating a thousand of these tuples, joining them with a ',' and inserting them in one statement.

the problem is I'm getting the error in the question.

I've even resorted to connecting to the DB every time I have a new insert statement. I can provide the code if you'dl ike, but it's all masked behind a `with` statement.

I see no reason for the connection to the DB to be dropped....

edit: why not. here's the code. inside a for loop:

```
with SQLConnection(DATASOURCES[SCHEDULEDB]) as db:
    db.execute_sql( command + ' ' + ','.join(block) + ';' )

```

couple of def's:

```
def execute_sql(self, query):
    if query.startswith('select'):
        return self.execute_read(query)
    else:
        return self.execute_other(query)

def execute_other(self,query):
    adapter = OdbcCommand(query,self.connection)
    adapter.ExecuteNonQuery()
    return True

```