I'm using a wordpress site for a company intranet. The site is hosted on one server and I want to connect to a different SQL server using an ODBC. Initally, I received this error:
"wpDataTables could not connect to mssql server. mssql said: There was a problem with your SQL connection - could not find driver"
So I downloaded PHP for SQL Server drivers for my PHP version to my host server PHP extension folder and updated the php.ini file adding: extension=php_pdo_sqlsrv.dll.
Now I'm getting this error:
"wpDataTables could not connect to mssql server. mssql said: There was a problem with your SQL connection - SQLSTATE[IM002] SQLDriverConnect: 0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
I'm not sure what I'm doing wrong or what I missed.
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.
The server to which wpDataTables is connecting has its own method of establishing the connection, and we're using PHPs logic of connecting to separate connections. If there are errors your server returns, those are returned by the server, and only displayed by wpDataTables - there's no additional log within wpDataTables that would distinctively show you what's behind the error.
Oh no... Aleksandar - I'm an idiot. I figured out my issue.
When I looked in our ODBC on the server - I saw a "SQL Server" driver listed in the drivers tab and just assumed that was the ODBC Driver for SQL Server. Just to be sure - I downloaded and installed "ODBC Driver 17 for SQL Server" and lo and behold - it's not the same!
I'm using a wordpress site for a company intranet. The site is hosted on one server and I want to connect to a different SQL server using an ODBC. Initally, I received this error:
"wpDataTables could not connect to mssql server. mssql said: There was a problem with your SQL connection - could not find driver"
So I downloaded PHP for SQL Server drivers for my PHP version to my host server PHP extension folder and updated the php.ini file adding: extension=php_pdo_sqlsrv.dll.
Now I'm getting this error:
"wpDataTables could not connect to mssql server. mssql said: There was a problem with your SQL connection - SQLSTATE[IM002] SQLDriverConnect: 0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
I'm not sure what I'm doing wrong or what I missed.
Hey Raven
Thank you for reaching out to us.
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.
The server to which wpDataTables is connecting has its own method of establishing the connection, and we're using PHPs logic of connecting to separate connections. If there are errors your server returns, those are returned by the server, and only displayed by wpDataTables - there's no additional log within wpDataTables that would distinctively show you what's behind the error.
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
Thanks Aleksandar,
I have all drivers installed and activated except DBLIB.
When I go to download the driver https://www.php.net/pdo_dblib the website says that it is no longer available on Windows.
Does this mean I will not be able to connect to a SQL server using the plugin?
Thanks,
Raven
That shouldn't be the case, Raven.
You should be able to use SQLSRV. Since this is an intranet, it will be difficult to pinpoint what's going on exactly.
Do you have a server admin that can look into this? Can you send me the list of all drivers you have installed (active and inactive)?
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 Aleksandar,
Here is a list of drivers I have installed on our host server:
php_bz2.dll,php_com_dotnet.dll,php_curl.dll,php_dba.dll,php_enchant.dll,php_exif.dll,php_ffi.dll,php_fileinfo.dll,php_ftp.dll,php_gd.dll,php_gettext.dll,php_gmp.dll,php_imagick.dll,php_imap.dll,php_intl.dll,php_ldap.dll,php_mbstring.dll,php_mysqli.dll,php_oci8_19.dll,php_odbc.dll,php_opcache.dll,php_openssl.dll,php_pdo_firebird.dll,php_pdo_mysql.dll,php_pdo_oci.dll,php_pdo_odbc.dll,php_pdo_pgsql.dll,php_pdo_sqlite.dll,php_pdo_sqlsrv.dll,php_pgsql.dll,php_phpdbg_webhelper.dll,php_shmop.dll,php_snmp.dll,php_soap.dll,php_sockets.dll,php_sodium.dll,php_sqlite3.dll,php_sysvshm.dll,php_tidy.dll,php_xsl.dll,php_zend_test.dll
Thanks,
Raven
Oh no... Aleksandar - I'm an idiot. I figured out my issue.
When I looked in our ODBC on the server - I saw a "SQL Server" driver listed in the drivers tab and just assumed that was the ODBC Driver for SQL Server. Just to be sure - I downloaded and installed "ODBC Driver 17 for SQL Server" and lo and behold - it's not the same!
Hopefully, this helps any wayward souls.
I'm so sorry - thanks for all your help!
Hello Raven,
No worries, it happens to all of us.
Glad to hear that you managed to resolve this issue.
Please let us know if you have any other questions.
Kind Regards,
Uros Jovanovic
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Mistake.