Python PxPlus数据库连接
正在尝试连接pxplus数据库,但不断出现此错误Python PxPlus数据库连接,python,database,pandas,pyodbc,Python,Database,Pandas,Pyodbc,正在尝试连接pxplus数据库,但不断出现此错误 enter code here DB = pyodbc.connect('DSN=ProvideX_UPS;DRIVER={PxPlus ODBC Driver}',autocommit=True) serial = '100170' cursor = FCDB.cursor() sql = ''' SELECT TOP(100)* FROM oropnh - Open Order Header ''' cursor.execute(s
enter code here
DB = pyodbc.connect('DSN=ProvideX_UPS;DRIVER={PxPlus ODBC Driver}',autocommit=True)
serial = '100170'
cursor = FCDB.cursor()
sql = '''
SELECT TOP(100)*
FROM oropnh - Open Order Header
'''
cursor.execute(sql,serial)
#get all tables
for row in cursor.tables(tableType='TABLE'):
print(row)
#convert sql dataframe to get table
pd.set_option('display.max.columns', 84)
df = pd.read_sql(sql, FCDB)
df.head(10)
这是我得到的错误:
错误:('37000','[37000][PxPlus][ODBC Driver]未找到预期的词法元素:(1015)(SQLPrepare)')