Connect to MSSQL-Server (solved) lazarus / 16-Databases ---------------------------------------------------------------------- eikko · 2017-11-15 12:51 Hi all, on Debian8 with Lazarus 1.6.2 i get a connection with "MSSQLConnection" to a MSSQL-Server, on Debian9 with the same Project in Lazarus 1.6.2 i get only an Error: "MSSQLConnection1 : Error 20013 : Server name not found in configuration files Unknown host machine name" Anyone a Idea why? Thanks eikko ---------------------------------------------------------------------- tudi_x · 2017-11-15 14:34 hi, did you place a connection object on the form or wrote the connection object from scratch in code? (i prefer the later) ---------------------------------------------------------------------- avra · 2017-11-15 14:44 Quote from: eikko on November 15, 2017, 01:51:33 pm"MSSQLConnection1 : Error 20013 : Server name not found in configuration files Unknown host machine name"Could you use server IP adress instead of server name and try again? ---------------------------------------------------------------------- eikko · 2017-11-15 14:55 @ tudi_x i edit the Parameters in the Propertys of the Component, in Debian8 it works fine! @ avra if i use the IP-Adress as Hostename i get an Error: "MSSQLConnection1 : Error 20009 : Unable to connect: Adaptive Server is unavailable or does not exist" Thanks eikko ---------------------------------------------------------------------- tudi_x · 2017-11-15 15:05 did you compare in the project lfm files the connection object? are the values the same? ---------------------------------------------------------------------- taazz · 2017-11-15 15:26 a bit more info is required. Please describe your setup for us, for example is the mssql server in a dedicated machine/VM? are there two separate sql servers? Are both clients (debian 8, debian 9) on the same network or there is any nat/router in between. Is there any firewall in between? does the firewall allow connections in ports bellow 1024 with out being a root/admin? do you have white list setup on your firewall? ---------------------------------------------------------------------- Graeme · 2017-11-15 20:15 Quote from: eikko on November 15, 2017, 01:51:33 pmAnyone a Idea why? If you SQL Server uses instance names, make sure you specify that in the connection string as well. For example, here is the connection string syntax I use in tiOPF with SqlDB (FPC) database components connecting to a SQL Server database. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     GTIOPFManager.ConnectDatabase('192.168.0.20:QTS3D', 'sa', 'password', '');     ...or with a server instance... Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     GTIOPFManager.ConnectDatabase('servername\instancename:QTS3D', 'sa', 'password', '');     ...or with extra connection parameters... Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     GTIOPFManager.ConnectDatabase('servername:databasename',        'sa', 'password', 'TextSize=16777216,ApplicationName=YourAppName'); ---------------------------------------------------------------------- eikko · 2017-11-16 06:53 Quotea bit more info is required. Please describe your setup for us, for example is the mssql server in a dedicated machine/VM? are there two separate sql servers? Are both clients (debian 8, debian 9) on the same network or there is any nat/router in between. Is there any firewall in between? does the firewall allow connections in ports bellow 1024 with out being a root/admin? do you have white list setup on your firewall? Hi taazz, in the network are exists 2 SQL-Servers in VmWare ESXi, there is no Firewall between Server and Client, Server and Clients are in the same Network, both Clients are running in a VmWare Workstation 10 QuoteIf you SQL Server uses instance names, make sure you specify that in the connection string as well. Hi Graeme, the SQL-Server is standard, no instances. Only the Name of the Server contains a "\" (HostName  = "xxx\yyyyyyyyy"), but we never had Problems with this! thanks eikko ---------------------------------------------------------------------- eikko · 2017-11-16 07:47 QuoteOnly the Name of the Server contains a "\" (HostName  = "xxx\yyyyyyyyy"),Sorry, this was a Mistake! Graeme was on the right way! With IP-Adress\Hostename ("xxx.xxx.xxx.xxx\yyyyyyyy") i get a Connection! Problem is solved! Thanks to all who helped! eikko