Have been using this method for a long time and recently, out of nowhere, I began to receive error messages like this:
(pyodbc.Error) ('HY010', '[HY010] [Microsoft][ODBC Driver 17 for SQL Server]Function sequence error (0) (SQLGetData)') (Background on this error at: https://sqlalche.me/e/14/dbapi)
I'm establishing connection to Azure SQL
SQL_obj = SQL.sql_db(curr_env=os.getenv('curEnv'),
server = os.getenv('sqlServer') + '.database.windows.net' ,
database = os.getenv('sqlDB'))
Then connecting to it
SQL_obj._connect(cnxn_type = 'SQL', sql_username = os.getenv('USRNAME'), sql_password = os.getenv('PSWD'))
engine = SQL_obj._engine()
And writing data to sql after
myDf.to_sql('table_name',engine, index=False, if_exists='append')
Would appreciate any help regarding this problem. Read a lot of documentation, and couldn't find anything. Thank you.