Board index » cppbuilder » BDS2006: Problems with Microolaps PostgresDAC and DBGrid

BDS2006: Problems with Microolaps PostgresDAC and DBGrid


2007-11-24 04:42:19 AM
cppbuilder108
Hi all,
i'm using BDS2006, mainly the C++Builer-Part of it, and the
PostgresDAC-Components of microolap to work with an Postgres-DB. At the
moment i'm stuck with following problem: i didnt get the result of a
PSQLQuery from the PostgresDAC-Components into a DBGrid. The Query is OK, i
can use its result in other ways. The official support at microolap says,
that this is a well known issue of CodeGears DBGrid. Anybody here can
approve this?
thanks, Jens
 
 

Re:BDS2006: Problems with Microolaps PostgresDAC and DBGrid

This works well with the Delphi personality.
Johann.
"Jens Nixdorf" < XXXX@XXXXX.COM >wrote in message
Quote
Hi all,

i'm using BDS2006, mainly the C++Builer-Part of it, and the
PostgresDAC-Components of microolap to work with an Postgres-DB. At the
moment i'm stuck with following problem: i didnt get the result of a
PSQLQuery from the PostgresDAC-Components into a DBGrid. The Query is OK,
i
can use its result in other ways. The official support at microolap says,
that this is a well known issue of CodeGears DBGrid. Anybody here can
approve this?

thanks, Jens


 

Re:BDS2006: Problems with Microolaps PostgresDAC and DBGrid

Jens Nixdorf wrote:
Quote
Hi all,

i'm using BDS2006, mainly the C++Builer-Part of it, and the
PostgresDAC-Components of microolap to work with an Postgres-DB. At the
moment i'm stuck with following problem: i didnt get the result of a
PSQLQuery from the PostgresDAC-Components into a DBGrid. The Query is OK, i
can use its result in other ways. The official support at microolap says,
that this is a well known issue of CodeGears DBGrid. Anybody here can
approve this?

thanks, Jens


I use it in Delphi and the "STOCK" db grid all the time.
There are issues with it and the Devexpress Quantum grid, but they are
easily overcome.
Might help if you let us know what the query SQL looks like, kind of
difficult to help you without that.
Later,
Tony Caduto
AM Software
Home Of Lightning Admin for PostgreSQL
www.amsoftwaredesign.com
 

{smallsort}

Re:BDS2006: Problems with Microolaps PostgresDAC and DBGrid

Tony Caduto schrubte am Sonntag, 25. November 2007 06:31:
Quote

Might help if you let us know what the query SQL looks like, kind of
difficult to help you without that
Its just a very simple query, just for testing. I have a DB with a table
t_testcase, which has two columns, t_project (SERIAL) and t_name (Text).
Here a short snippet of my testcode:
-----------------------------------------------------------------------
sprintf(sql_query,"SELECT * FROM t_testcase WHERE (t_testcase.t_project
= '%i')",project_id);
PQ2->SQL->Text=sql_query;
DBGrid1->DataSource->DataSet=PQ2;
PQ2->Open();
-----------------------------------------------------------------------
PQ2 is a PSQL-Component and its linked to the Database via Objectinspector.
The code from the above snippet is compiling without an error. The function
is started when i'm pressing a button, and then i'm getting immediately an
access-violation-exception.
The qery is working, if i use it in following code:
-----------------------------------------------------------------------
sprintf(sql_query,"SELECT * FROM t_testcase WHERE (t_testcase.t_project
= '%i')",project_id);
PQ2->SQL->Text=sql_query;
PQ2->Open();
project_name=PQ2->Fields->Fields[1]->AsString;
-----------------------------------------------------------------------
Some other functions out of PostgresDAC i#m currently using are working
flawless, only this DBGrid-Thing isnt running. But maybe its my fault,
because i'm not a hero in C/C++ and also not in SQL.
regards, Jens
 

Re:BDS2006: Problems with Microolaps PostgresDAC and DBGrid

That works fine here with the Delphi personality and the CPP Builder
personality. Is it that the grid is not populated at all?
Johann.
"Jens Nixdorf" < XXXX@XXXXX.COM >wrote in message
Quote
Hi all,

i'm using BDS2006, mainly the C++Builer-Part of it, and the
PostgresDAC-Components of microolap to work with an Postgres-DB. At the
moment i'm stuck with following problem: i didnt get the result of a
PSQLQuery from the PostgresDAC-Components into a DBGrid. The Query is OK,
i
can use its result in other ways. The official support at microolap says,
that this is a well known issue of CodeGears DBGrid. Anybody here can
approve this?

thanks, Jens


 

Re:BDS2006: Problems with Microolaps PostgresDAC and DBGrid

Johann Campbell schrubte am Sonntag, 25. November 2007 14:35:
Quote
That works fine here with the Delphi personality and the CPP Builder
personality. Is it that the grid is not populated at all?
Can you give me a hint what i'm doing wrong? Please have a look at my other
posting from today, which explains a little bit what i want to do.
Thanks, Jens
 

Re:BDS2006: Problems with Microolaps PostgresDAC and DBGrid

I tried using your code snippet on some data of mine to see if any issues
existed with runtime assignment of the query and components and I was still
able to get results. You mentioned an access violation, what are the details
of the access violation? Can you post its message?
Johann
"Jens Nixdorf" < XXXX@XXXXX.COM >wrote in message
Quote
Tony Caduto schrubte am Sonntag, 25. November 2007 06:31:
>
>Might help if you let us know what the query SQL looks like, kind of
>difficult to help you without that

Its just a very simple query, just for testing. I have a DB with a table
t_testcase, which has two columns, t_project (SERIAL) and t_name (Text).

Here a short snippet of my testcode:

-----------------------------------------------------------------------
sprintf(sql_query,"SELECT * FROM t_testcase WHERE (t_testcase.t_project
= '%i')",project_id);
PQ2->SQL->Text=sql_query;
DBGrid1->DataSource->DataSet=PQ2;
PQ2->Open();
-----------------------------------------------------------------------

PQ2 is a PSQL-Component and its linked to the Database via
Objectinspector.
The code from the above snippet is compiling without an error. The
function
is started when i'm pressing a button, and then i'm getting immediately an
access-violation-exception.

The qery is working, if i use it in following code:

-----------------------------------------------------------------------
sprintf(sql_query,"SELECT * FROM t_testcase WHERE (t_testcase.t_project
= '%i')",project_id);
PQ2->SQL->Text=sql_query;
PQ2->Open();
project_name=PQ2->Fields->Fields[1]->AsString;
-----------------------------------------------------------------------

Some other functions out of PostgresDAC i#m currently using are working
flawless, only this DBGrid-Thing isnt running. But maybe its my fault,
because i'm not a hero in C/C++ and also not in SQL.

regards, Jens



 

Re:BDS2006: Problems with Microolaps PostgresDAC and DBGrid

Jens Nixdorf wrote:
Quote
Hi all,

i'm using BDS2006, mainly the C++Builer-Part of it, and the
PostgresDAC-Components of microolap to work with an Postgres-DB. At the
moment i'm stuck with following problem: i didnt get the result of a
PSQLQuery from the PostgresDAC-Components into a DBGrid. The Query is OK, i
can use its result in other ways. The official support at microolap says,
that this is a well known issue of CodeGears DBGrid. Anybody here can
approve this?

thanks, Jens


Jens,
What is exactly the issue according to the support ? That Delphi's
dbgrid does not show the result of a query ??? Never seen that. Whenver
I have an issue with a query, I always dump a tdbgrid on the form,
connects it's datasource and voil? To me it has never failed. So ask
what they mean exactly!!!
PS the only thing I can thing of is a wrong font color (ie same as
background)
Didier