I'm attempting to create a Separate DB Connection to an SQL Server but I'm getting the error
wpDataTables could not connect to mssql server. mssql said: There was a problem with your SQL connection - could not find driver
Both php_pdo_sqlsrv_74_nts_x86.dll and php_sqlsrv_74_nts_x86.dll files have been copied to the server and placed in the ext sub-folder of PHP. The PHP ini file has been updated accordingly. Is there something else I am missing?
We are hosting Wordpress on a Windows 2016 server using IIS.
Can you please check if you have the following drivers installed, and activated?
These drivers need to be installed and activated on the server where your WordPress website is. After you install and activate those drivers, it should work fine.
If you're not sure how to install the drivers, please reach out to your hosting provider.
OK, the only PDO drivers installed are mysql, sqlite, sqlsrv, so I'll have a look into that.
It sort of works as-is, but some queries produce no results, but do in SQL itself when tested. It doesn't appear to error, but maybe those others drivers are required for certain queries?
It was a simple query, that looks up active tickets, identifies the department where it originated and returns the status of the ticket.
I believe it has an issue with sorting, as I removed the ORDER BY clause, and records were returned. The field I was sorting on was classified as varchar(max). Is there a limit to the field size? I could create a view over the data accordingly.
There doesn't appear to be support for stored procedures. Is that correct?
When working with the server-side processing feature, please note:
Please do not use “LIMIT” in the SELECT statement. wpDataTables adds it automatically and it will be overridden.
Please do not use “ORDER BY” in the SELECT statement. wpDataTables has its own sorting engine so it makes no sense to use MySQL’s sorting, since it will be overridden. Also, server-side processing feature adds this part of statement automatically when users trigger the sorting on the front-end, and having it in initial statement may cause the table to crash.
Using variables ( @ ), stored procedures and nested queries is not supported, but you can prepare a MySQL view (which will return the data you need); call it “view1” for example, and then build a wpDataTable based on a simple query like “SELECT * FROM view1".
We do not provide support for custom queries, that is correct.
I'm attempting to create a Separate DB Connection to an SQL Server but I'm getting the error
wpDataTables could not connect to mssql server. mssql said: There was a problem with your SQL connection - could not find driver
Both php_pdo_sqlsrv_74_nts_x86.dll and php_sqlsrv_74_nts_x86.dll files have been copied to the server and placed in the ext sub-folder of PHP. The PHP ini file has been updated accordingly. Is there something else I am missing?
We are hosting Wordpress on a Windows 2016 server using IIS.
Hello again Julie
Can you please check if you have the following drivers installed, and activated?
These drivers need to be installed and activated on the server where your WordPress website is. After you install and activate those drivers, it should work fine.
If you're not sure how to install the drivers, please reach out to your hosting provider.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi Aleksander
OK, the only PDO drivers installed are mysql, sqlite, sqlsrv, so I'll have a look into that.
It sort of works as-is, but some queries produce no results, but do in SQL itself when tested. It doesn't appear to error, but maybe those others drivers are required for certain queries?
I'm happy to close this ticket.
Many thanks.
Julie
That has nothing to do with drivers. You wouldn't be able to connect to a separate DB connection if it had something to do with the drivers.
What queries don't work?
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi
It was a simple query, that looks up active tickets, identifies the department where it originated and returns the status of the ticket.
I believe it has an issue with sorting, as I removed the ORDER BY clause, and records were returned. The field I was sorting on was classified as varchar(max). Is there a limit to the field size? I could create a view over the data accordingly.
There doesn't appear to be support for stored procedures. Is that correct?
Regards
Julie
Hi again Julie
When working with the server-side processing feature, please note:
Using variables ( @ ), stored procedures and nested queries is not supported, but you can prepare a MySQL view (which will return the data you need); call it “view1” for example, and then build a wpDataTable based on a simple query like “SELECT * FROM view1".
We do not provide support for custom queries, that is correct.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Many thanks for the info Aleksandar.
I didn't notice the ability to configure each column, including sorting, so that resolves the issue I was having.
Regards
Julie
You're welcome Julie!
Glad I could be of service.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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