An error occurred while connecting to the database…reported by the server was: could not find driver
An error occurred while connecting to the database…reported by the server was: could not find driver
pborregg
Posts: 59Questions: 2Answers: 0
I'm getting this on my WIN 2012 SERVER...
Here's the LINK: [retracted]
This link will only be up until this issue is solved. Thanks.
This works LOCALLY... just fine...
The DATABASE is MS SQL SERVER...
The PHP INI for my local machine and SERVER on 1and1 hosting are identical
PLEASE HELP. I need this to work.
This discussion has been closed.
Answers
The error suggests that the PHP install on your grow.thingblugrow.com domain doesn't have the MSSQL server PDO driver installed.
If you create a file called info.php and simply insert
<?php phpinfo();
into it, and then load it in your browser, it will show information about your PHP install. Scroll down to the "PDO" section and it will state what drivers are installed. There will be a difference between the two servers.Allan
Allan, thanks, that's exactly what I found as the server was new and I needed.
Now, I would like to talk about making the table "DETAIL" drawer or slide down details appear. I don't know if you've changed things, but it's not working for two tables on the same page. I actually figured out how to make it work with Angular and modified your code to do so, including HISTORY within the details!!! Awesome. I'd be happy to share that code with you and your team.
Anyway, thanks and let me know the EASIEST solution for a simple table with details...
Thanks, and I appreciate your assistance Alan.
OH, and I have a link to the site with that details and history.
Allan, everything seems to be working now...nicely, actually but one minor issue.
So, I'm using a BASIC setup for two TABLES on the same page. Not the problem, and I'm preloading all TABLES with Angular using a ui-router which work very nicely.
The problem this:
GIVENS:
Table 1 is above Table 2
Both load their data nicely, no errors
ERROR OCCURS when the last table loaded in my script, TABLE 2 and I need to CLICK ON DETAILS row in TABLE 1. The last loaded table, TABLE 2, tries to show in TABLE 1's details row and CHOKES!!!
Reason:
in my CODE for the on('click')... BELOW where $scope.theTable === the LAST LOADED TABLE but is NOT the table that I click on, necessarily.
'''js
$('#' + $scope.theTable + ' tbody').on('click', 'tr td.details-control', function () {
var tr = $(this).closest('tr');
var row = dt.row(tr);
'''
HENCE, the first line of this script NEEDs to be the "VALUE" of the CLICK TABLE not the last LOADED table...
I found it in
'''js
$(this)[0].offsetParent.id
'''
BUT, that occurs BEFORE the row is clicked and I tried doing this:
'''js
var clickedTable = $(this)[0].offsetParent.id;
'''
but it FAILS on initial LOAD hence, ERROR on all 6 Datatables that are being PRELOADED.
SOLUTION: How can I get the NAME (ID) of the PARENT TABLE to ensure that the correct table goes INTO the $scope.theTable when I click on an already PRELOADED table??? Thanks
I'm afraid I don't know - I'm really not very familiar with Angular and its routing. If you had an example page you could link to I might be able to figure it out, but can't promise anything!
Allan
OK, Allan, all is well and it's great...I simply separated the multi-tables into two separate pages. We're good.
Now, I want to know is when I refresh on a datatables page, i get "cannot reinitialize" but when I go to another page, refresh and come back, everything is fine.
How do I avoid that message when I or a user REFRESHES on a datatables page?
Thanks
This tech note details what is causing that error and how to resolve it.
Allan
Thanks, Allan, you're great.
So now I'm getting this error whenever I click on a ROW to view the DETAIL
Uncaught TypeError: ((x.event.special[i.origType] || (intermediate value)).handle || i.handler).apply is not a function
at HTMLTableElement.dispatch (http://localhost/ThingBlu/OmniGrow/assets/javascripts/jquery/jquery.min.js:4:14129)
at HTMLTableElement.v.handle (http://localhost/ThingBlu/OmniGrow/assets/javascripts/jquery/jquery.min.js:4:10866)dispatch @ jquery.min.js:4v.handle @ jquery.min.js:4
mainController.js:1240 CURRENT TABLE: [object Object]
The table works GREAT but the error happens behind the scenes.
I found this on Stackoverflow:
http://stackoverflow.com/questions/32231036/uncaught-typeerror-x-event-speciali-origtype-intermediate-value-handl
Anyway, is my JQUERY version? It just started... Hmmmm
OOPS, found the error....
LINE 1240: console.log("CLICKED TABLE ID: ", currentTable.context[0].nTable.id);
I'll comment it out. But anywho... that's still a P3 (LOW PRIORITY) concern
If you are able to give me a link to the page I'd be happy to take a look. I don't immediately know what is causing that I'm afraid.
Allan
Alan, I will but you need to promise me that you keep this to yourself. I've signed an NDA and stuff for this software I've created. I have a link and I'll give you my login.
Is this a PM or public?
If you write me a PM, I'll send unless this is Private.
Thanks,
Peter
This is public - send me a PM by clicking my name above and then the "Send message" button.
Allan