Okay
  Public Ticket #1898796
Connect wpdatatables to Microsoft Sql
Closed

Comments

  • it_app started the conversation

    When I am trying to MS Sql from wpdatatables , I am receiving the following error:

    wpDataTables could not connect to mssql server. mssql said: There was a problem with your SQL connection - SQLSTATE[HYT00]: [unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired

  •  2,572
    Aleksandar replied

    Hello it_app.

    Thank you for your purchase.

    If you are using separate MySql connection option to connect to mysql database, you can test if connection can actually be established with “Test MySQL settings” button.
    If connection can’t be established, first please make sure that all entered values needed for connection are correct.
    Also, make sure that MySql server is allowing remote connections and that MySql user that you are trying to connect with is allowed to connect from your sites host(IP address).

    From 2.3 version of our plugin there is an option to add more than one separate database connection. Now every table can have its own separate database connection, so tables can pull data from multiple databases and servers.

    If your WordPress is hosted on Azure Web App Services you will need to modify the config.inc.php file, around line 65 find this line of code

    $wdtMsSqlDriver = [
    'sqlsrv' => ['active' => false],
    'dblib' => ['active' => true, 'version' => '7.0'],
    'odbc' => ['active' => false, 'driver' => '{ODBC Driver 17 for SQL Server}'],
    ];

    and change it to look like this:

    $wdtMsSqlDriver = [
    'sqlsrv' => ['active' => true],
    'dblib' => ['active' => false, 'version' => '7.0'],
    'odbc' => ['active' => false, 'driver' => '{ODBC Driver 17 for SQL Server}'],
    ];

    I hope this helps.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • it_app replied

    Dear Aleksandar,

    Thanks for your reply but we are using Microsoft SQL server 2016 on-premise as data source. The solution you provided doesn't fit our situation.   

  •  2,572
    Aleksandar replied

    Hello again it_app.

    From Microsoft:

    "The Microsoft Drivers for PHP for SQL Server are PHP 5 extensions that allows for the reading and writing of SQL Server data from within PHP scripts. The release contains two drivers, the SQLSRV driver and the PDO_SQLSRV driver. The SQLSRV extension provides a procedural interface while the PDO_SQLSRV extension implements PDO for accessing data in all editions of SQL Server 2005 and later (including SQL Azure)"

    Our plugin is using PDO_SQLSRV driver.

    Can you please check do you have installed and enabled PDO extension (pdo_sqlsrv) on your server?

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables