Hi there...
is there any one knows how to convert object from class IZResultSet to TDataSet descendant? Iwant to display it with TDBGrid.
I'm using Lazarus, ZEOS 6.6.6, and MySQL5.5.
In my database I have stored procedure that returns multiple resultsets. I found an example used of ZEOS for calling this stored procedure. It uses IZResultSet for storing those resultsets. But in that example, we just can calling each field and put them into a TLabel or TEdit. Now I want to display them in TDBGrid.
A member in other forum told me that it could be done (but not tell me how) . What i was thinking is copying each row and each field into TDataset descendant using loop (FOR or WHILE). But this is silly
*sorry for my bad English
WTA - How To Convert IZResultSet to TDataSet?
Moderators: gto, EgonHugeist
hi mdaems...
i've described it in above...
"In my database (MsSQL & MySQL) I have stored procedure that returns multiple resultsets. I found an example used of ZEOS for calling this stored procedure. It uses IZResultSet for storing those resultsets. But in that example, we just can calling each field and put them into a TLabel or TEdit. Now I want to display them in TDBGrid."
and the solution was writen by your self.
http://zeos.firmos.at/viewtopic.php?t=1141
i've described it in above...
"In my database (MsSQL & MySQL) I have stored procedure that returns multiple resultsets. I found an example used of ZEOS for calling this stored procedure. It uses IZResultSet for storing those resultsets. But in that example, we just can calling each field and put them into a TLabel or TEdit. Now I want to display them in TDBGrid."
and the solution was writen by your self.
http://zeos.firmos.at/viewtopic.php?t=1141
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
NiksenH,
Sorry for not reading your question good enough. Indeed, I remember the post you refer to.
I see two possible solutions.
- Write a TZAbstractRODataset method OpenFromIZResultset. When you publish that for the TZReadOnlyQuery that may work fine.
- Make a component/class similar to ZSQLMetadata. That's a component that shows data that does not originate from sql queries (at least : not directly)
Mark
Sorry for not reading your question good enough. Indeed, I remember the post you refer to.
I see two possible solutions.
- Write a TZAbstractRODataset method OpenFromIZResultset. When you publish that for the TZReadOnlyQuery that may work fine.
- Make a component/class similar to ZSQLMetadata. That's a component that shows data that does not originate from sql queries (at least : not directly)
Mark