Nette 2.0 + DB Layer + Datagrid + MSSQL. Anyone having working setup?

Notice: This thread is very old.
Member | 60


I am trying to tweak the mentioned configuration. I have tried gridito, grido dibi and nette\database but it never worked for me even with simple queries. When I setup the same DB model on mysql, I can get it working but not with mssql.

For example, dibi and grido:

          $fluent = dibi::select('*')

            $grid = new Grido\Grid($this, $name);
            $grid->addColumn('Email', 'E-mail', \Grido\Components\Columns\Column::TYPE_MAIL);
            $grid->addColumn('FullName', 'Full Name', \Grido\Components\Columns\Column::TYPE_TEXT);

With mysql it works, with mssql I get: No column name was specified for column 1 of ‘t’.
The native query built by dibi is: “SELECT TOP 1 * FROM ( SELECT COUNT(*) FROM [table]) t”

Now other requirements on the data grid:

It does need to be editable, readonly is enough. The SQL query is really complex, more than 100 lines with joins (tables accross multiple databases) and functions. I am not really expert on SQL – but I have the query provided by SQL expert. So I would like to supply the query in more or less raw format and add few more filtering and sorting functionalities via datagrid. How to make this working if for example dibi::query is not fluent interface and in dibi::select I can not fit my query?

Has anyone faced similar scenario? What DB layer and data grid would you choose with nette 2 and mssql?
How to get complex queries into fluent interface? Is this even doable or should I rather forget datagrid solution?

PS: it needs to be mssql – not my choice

Thanks a lot.

Last edited by richard (2013-04-02 04:24)

Member | 1831

Personally I prefer Nette\Database, but I understand it's not ready for mssql. We need to add some reflection queries. If you would like to help it would be awesome. Please contact me on jabber

Otherwise, I have own datagrid nextras\datagrid, so I would prefer it.