Search code examples
delphisql-server-2012delphi-xe5

Can't Connect to DelphiXE5 AND SQL SERVER 2012


I have a Delphi application that is connected to SQL Server 2012. On my local, I've been able to connect successfully. I've also tried it on another VM, and it work fine. I deployed it on a Server, and it won't connect to the database. I check the connection string; it looks fine. I am not sure what I am doing wrong here.

  • SQL Server 2012 is installed on a different server
  • I can reached the server
  • I check the provider and it's using SQLNCI11
  • I have SQL Server 2012 Natice Client Install
  • I check and make sure that the username/password have access to the database, and they can login

What am I missing here?


Solution

  • Despite the fact that you can change the vendor lib in the provider, that change will have no effect as the name of the DLL is hard-coded into the provider. It will try to use sqlncli10.dll, no matter what the property is.

    Install sqlncli10.dll and it should work.