I am trying to load data frame 'f3' to MS SQL server running in localhost with the help of python script. Here is my code;
import sqlalchemy
import pyodbc
engine = sqlalchemy.create_engine("mssql+pyodbc://localhost/test_project")
f3.to_sql("test", engine)
However, I am getting an error which I could not figure out what I did wrong. Can somebody please help me to find what's wrong I am doing?
Below is the error I am getting;
DBAPIError: (pyodbc.Error) ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')
to_sqlnormally creates a table. If you don't have permission to do that, that might would be one issue. - James K. Lowdenselect count(*) from systablesworks in pyodbc, then do the same in sqlalchemy. After that works, then try something with Pandas. - James K. Lowden