Categories | Question details Back To List | ||||||||
Grid usage with Oracle Hello, I am considering using this grid for a intranet application. Is it possible to use it on an Oracle database? Are there any examples on how to do this laying around? Thanks Answer posted by dhxSupport on Mar 23, 2009 03:09 The component are fully client side and can operate with data only inside the browser, they has not access to local file system and can't save and read data from it. Answer posted by Support on Mar 23, 2009 05:44 While component is fully client side, it can't be attached directly to database, but in version 2.1 it contains connectors http://dhtmlx.com/docs/products/dhtmlxConnector/index.shtml , using which and optional PDO addition http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=8711 allows to connect client side component to database with few lines of code Answer posted by Francis on Mar 23, 2009 07:43 This is indeed what I am looking for, but I need to work with an Oracle database. I found in the documentation that v.1.0 works with mySQL and postgreSQL only. Is this the current version? Is Oracle a supposted database now? Thanks! Answer posted by Support on Mar 23, 2009 08:28 You can use PDO connection type ( link for PDO DB connector posted above ) PDO allows to connect to few types of databases, including Oracle http://php.net/pdo http://www.php.net/manual/en/ref.pdo-oci.php We have an separate extension for Oracle, but it not finished yet, please inform if connection to Oracle through PDO can't be used in your case Answer posted by Francis on Mar 23, 2009 12:56 I am trying, but I am having a problem initializing the GridConnector object. The default type is MySQL, what argument should be passed to use PDO? $gridConn = new GridConnector($res,"????"); Thanks Answer posted by Support on Mar 24, 2009 04:35 Sorry for inconvenience , one of above links was incorrect Please check http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=8438&ssr=yes&s=PDO $dbh = new PDO(...); require("../../codebase/grid_connector.php"); require("../../codebase/db_pdo.php"); $grid = new GridConnector($dbh,"PDO"); //same for other connector objects Answer posted by Francis on Mar 24, 2009 13:46 Things seem to be working properly now. One question though: I can't seem to be able to use the dynamic loading because by defaut, the SQL that gets generated uses the syntax 'LIMIT 0, 100'. That syntax is not part of the Oracle dialect and the query errors out. Is it a PDO problem, or something that should be corrected within your objects? The smart rendering works though. If I use a table that is reasonably large (a few 100's of records), I have no problem. If I use a table that has 10,000's or records, the script times out. Answer posted by Support on Mar 25, 2009 02:10 >>Is it a PDO problem Component uses similar SQL syntax for all databases attached through PDO , and as result may fail if target DB doesn't support "LIMIT" instruction ( it used for dyn. loading only ) We will check possibility to extend current functionality. Updated PDO connector or separate connector for Oracle will be available in few days. Answer posted by Francis on Mar 25, 2009 03:55 Great, thank you. Please keep me posted. Answer posted by Support on Mar 27, 2009 03:10 Updated version of db_pdo.php attached to email, just use it instead of previous version. With new file, connector will generate oracle-valid queries in dyn. loading mode. ( This is not final version of pdo connector, because, while it works with oracle, now it causes problems for other DB types; but must be enough to resolve your problem ) Attachments (1)
|