Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-12

ODBC with FreeTDS on Ubuntu 8.10

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Diwakoe

Dear all,

I'm try to connect into MSSQL from linux using ubuntu - unixodbc - FreeTDS. First connect using FreeTDS via command shell connect well into MSSQL and can execute query from any table. Second is try using odbc connection in lazarus 0.9.26 connect to MSSQL and get error (attached).

Is there any guide how to use odbc on linux using unixodbc and FreeTDS?

Thanks,
Diwa

Semua rasa ada disini http://www.teoteblung.co.cc -------------- next part -------------- A non-text attachment was scrubbed... Name: odbc_errorx.png Type: image/png Size: 6971 bytes Desc: not available Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081224/c3f3a822/attachment.png

Reply by email

Joost van der Sluis
to Diwakoe

Op woensdag 24-12-2008 om 15:43 uur [tijdzone +0700], schreef Diwakoe:

Show quoted text 9 lines
Dear all, I'm try to connect into MSSQL from linux using ubuntu - unixodbc - FreeTDS. First connect using FreeTDS via command shell connect well into MSSQL and can execute query from any table. Second is try using odbc connection in lazarus 0.9.26 connect to MSSQL and get error (attached). Is there any guide how to use odbc on linux using unixodbc and FreeTDS?

My guess is that you used sqldb.

Set TSQLQuery.ParseSQL to false. Or else you could set TSQLQuery.UsePrimaryKeyAsKey to false.

For some reason it can not find the primary key of the table. It could be that there is none defined, or the odbc-driver that you use to access MsSql doesn't support the retrieval of the primary key.

Or, it's a bug in TODBCConnection, offcourse.

Joost.

Reply by email

Diwakoe
to Joost van der Sluis
Joost van der Sluis wrote 24 lines
Op woensdag 24-12-2008 om 15:43 uur [tijdzone +0700], schreef Diwakoe: > Dear all, > > I'm try to connect into MSSQL from linux using ubuntu - unixodbc - > FreeTDS. First connect using FreeTDS via command shell connect well > into MSSQL and can execute query from any table. Second is try using > odbc connection in lazarus 0.9.26 connect to MSSQL and get error > (attached). > > Is there any guide how to use odbc on linux using unixodbc and FreeTDS? My guess is that you used sqldb. Set TSQLQuery.ParseSQL to false. Or else you could set TSQLQuery.UsePrimaryKeyAsKey to false. For some reason it can not find the primary key of the table. It could be that there is none defined, or the odbc-driver that you use to access MsSql doesn't support the retrieval of the primary key. Or, it's a bug in TODBCConnection, offcourse. Joost.

Hi Joost,

You are right I'm using sqldb, all being set and now I can access my mssql database from linux.

Thank you.

Cheers,
Diwa

Semua rasa ada disini http://www.teoteblung.co.cc

Reply by email