ODBC Problem

HI, i try to connect to a MSSQL database using FREETDS 64 bit in UBUNTU 12.04 64 bit.

From the terminal i connect without problem with the ODBC connector (UNIXODBC)

But when i try to do this in my web app:

Dim db As New ODBCDatabase
db.DataSource = “odbcname”
db.UserName = “user”
db.Password = “password”
If db.Connect Then
//proceed with database operations
MsgBox("Error: " + db.ErrorMessage)
End If

I receive the following error:

Error: [iODBC][Driver Manager]/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so: wrong ELF class: ELFCLASS64

I think that i need a 32 bits FREETDS or other something,

but i don’t know how to install a 32bits FREETDS and UNIXODBC package in UBUNTU 12.04 64 bits.

Or maybe other solution.

Please help

Hi @Darwin Quinones !

I read your post, because i’m having similar problems…

Could you please give a look at my thread?

Maybe you can help me…

Thank you


You can try MBS Xojo SQL Plugin as an alternative…

sudo apt-get install freetds-bin:i386

You tried to change in odbcinst.ini from /usr/lib64/libtdsodbc.so.0 to /usr/lib/libtdsodbc.so.0/usr/lib64/libtdsodbc.so.0?

could you send me (if you still have) the DSN file?

when i put the db.DataSource = “mysdnname” , the application crashes…

thank you

Can anyone tell me what’s the mininum / correct configuration on XOJO ODBCDatabase to connect to MSSQL?