madcorp / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

CSV export doesn't work with SQL Server database #893

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I create datagrid with basic action, and the source is a zend_select.

What is the expected output? What do you see instead?
1. When i try to export above created grid in PDF or Print option then it will 
worked as expect.
2. While i was trying to export in CSV format, it will execute infinite loop 
and never terminated.  

Please insert the appropriate values;
                    Zend Framework version: 1.9
ZFDatgrid Version (Bvb_Grid::getVersion()): $Rev: 1218 $
                          Operating system: Windows
                               PHP Version: 5.3
               Database Server and version: SQL Server 10.0.1600
                          Source Adatapter: sqlsrv

Please provide any additional information below.
Code snippet for infinite loop [You will find out this code in 
BvB/Grid/Deploy/Csv.php Line No.175]:
do {
            $i += $this->_pagination;
            $this->csvAddData(self::buildGridCsv(parent::_buildGrid()));
            $this->csvAddData(self::buildSqlexpCsv(parent::_buildSqlExp()));
            // get next data
            $this->getSource()->buildQueryLimit($this->_pagination, $i);
            $this->_result = $this->getSource()->execute();
        } while (count($this->_result));

Original issue reported on code.google.com by jayesh...@gmail.com on 22 Jun 2013 at 1:33

GoogleCodeExporter commented 9 years ago
Hello All,
After spending more that 2 days i found the solution. The solution is upgrade 
the Zend Library from 1.9 to 1.12 and its all good to go.

Original comment by jayesh...@gmail.com on 24 Jun 2013 at 1:26