Connect to remote MS-SQL Server lazarus / 16-Databases ---------------------------------------------------------------------- Ñuño_Martínez · 2007-01-09 10:23 Hello and happy new year to everybody. I'm trying to connect to a remote MS-SQL Server using TODBCConnect but I can't. I set Driver = SQL Server and then I tried different values for DSNFilename, Server, DSN, etc. but it doesn't connect. How should I connect with the remote MS-SQLServer data base? ---------------------------------------------------------------------- matthijs · 2007-01-11 18:13 1. Create a system-DSN which connects to your DB-server. Make sure it connects to the server by testing it. 2. Use the name of this system-DSN in the DatabaseName-property of your ODBCConnection. If you use persistent login information you can connect to DB-server without any other settings in ODBCConnection ---------------------------------------------------------------------- Ñuño_Martínez · 2007-01-15 11:04 Thanks. It works. ---------------------------------------------------------------------- moespi · 2007-01-19 19:27 Hi Ñuño, that other components you used to collect data,  for example uses TSQLQuery ? TDataSource? with TODBCConnection ---------------------------------------------------------------------- Ñuño_Martínez · 2007-01-22 16:30 I used TODBCConnection to connect with the database, TSQLQuery to execute SQL commands, TSQLTransaction to manage transactions (just set the TSQLTransaction.Database and TSQLQuery.Transaction propertyes and it should work) and TDataSource to interface the SQL result and the DataControls. [edit] It should be nice to put an TODBCConnection example in the Lazarus Database Tutorial. I haven't time enought to write it now but I can send a small example I wrote to understand it.