Forums

Using Sql Variant Datatype in Python connecting MSSQL through PyOdbc

Hello,

I am using python 2.7. I am connecting MSSQL server using PyOdbc. I had used SQL Variant datatype. But while i am retriving data from MSSQL i have to do type casting for SQL Variant data type and for this i have to give size of this data type and because of giving size data may be lost if data is huge.

If anyone have any idea about how to use SQL Variant in MSSQL using PyOdbc in python?

Is there any issues related to version of pyodbc.pyd file that i had install using pip? While searching i came to one point that tells when we install pyodbc.pyd file using pip ,it install latest version of python. and i have 2.7 vesrion of python and latest is 3.1 something.

If anyone have faced this type of issue ? Can anyone suggest me right solution for this?

I don't know much about microsoft sql server I'm afraid... anyone else? Maybe stackoverflow would be a good place to ask as well?