NoFlame
02-02-2012, 06:46 AM
Hi guys, i've try use maya python to get data from our database(SQL-Server) via ODBC.
We have a table,named user, which has tree columns, id(int), name(varchar), login_time(dataTime).
the follow query work well
SELECT id, name FROM user #work well
SELECT id, login_time FROM user #work well
SELECT login_time FROM user #work well
but when i query this, things go wrong
SELECT name, login_time FROM user
It return "internalError: [Microsoft][ODBC SQL Server Driver]無效的敘述元索引 in SQLGetData"
Sorry for the Chinese word, it means "Index invalid element narrative" (google translate...)
if you use convert, it works
SELECT convert(varchar, name), convert(varchar, login_time) FROM user
Does anyone know the reason of the problem ?
We have a table,named user, which has tree columns, id(int), name(varchar), login_time(dataTime).
the follow query work well
SELECT id, name FROM user #work well
SELECT id, login_time FROM user #work well
SELECT login_time FROM user #work well
but when i query this, things go wrong
SELECT name, login_time FROM user
It return "internalError: [Microsoft][ODBC SQL Server Driver]無效的敘述元索引 in SQLGetData"
Sorry for the Chinese word, it means "Index invalid element narrative" (google translate...)
if you use convert, it works
SELECT convert(varchar, name), convert(varchar, login_time) FROM user
Does anyone know the reason of the problem ?
