MSSQL from Linux... lazarus / 16-Databases ---------------------------------------------------------------------- joseywales72 · 2009-09-11 12:07 Hi, I'm trying to connect to a MSSQL server from Linux. So far, I have managed to use tsql, a command line util of FreeTDS driver package to connect the database and make queries on it. I'm trying examples from Lazarus components like SQLDb. It always returns a driver and a dsn error. On the other hand, there is Zeos.But it seems that, Zeoslib cannot be used crossplatform. I mean, you cannot connect to a Windows server from a Linux client, because it needs a DLL something called ntwd... Is there anything I can do? Thank you in advance. Anil ---------------------------------------------------------------------- cpalx · 2009-09-11 12:41 Did you try ODBC?. First of all you must configure the odbc driver in Linux. ---------------------------------------------------------------------- joseywales72 · 2009-09-12 14:21 Sure. When I was talking about tsql of FreeTDS package, I had already installed and configured UnixODBC. FreeTDS is a free sybase and Mssql driver for linux, and unixodbc uses it through its config files. So, at the command line at least, I managed to connect and query a remote mssql server. What I cannot do is to connect using Lazarus' components like SQLDb or Zeos. When I put a ODBCConnection control on a form and enter all the details like port, host, user etc. and enable the connection by setting the control connection status to true, an error message appears stating that the connection cannot be established, no driver found and host cannot be reached. I am not sure what to do next. ---------------------------------------------------------------------- tatamata · 2009-09-13 12:44 Have you tried to use Windows compiled .exe via Wine emulator? Wine emulator is very mature now and most Windows application can be executed through it... ---------------------------------------------------------------------- cpalx · 2009-09-13 14:25 i dont think to use wine is a good idea. The connection must work in native mode. I will try to test in my PC. I will try to get MS SQL server, it will take me a couple of days. I will tell you my experiences. ---------------------------------------------------------------------- joseywales72 · 2009-09-14 05:48 Quotei dont think to use wine is a good idea. The connection must work in native mode. I will try to test in my PC. I will try to get MS SQL server, it will take me a couple of days. I will tell you my experiences. Thank you. I'm using MSSQL Server 2005 Express edition which is free. It doesn't enable remote connections by default but through configuration after installation. In the meantime I will try different settings and I'll wait for your experiences.