Re: ECPG and dynamic SQL - Mailing list pgsql-interfaces

From Christof Petig
Subject Re: ECPG and dynamic SQL
Date
Msg-id 3D4E9D9C.1040301@petig-baender.de
Whole thread Raw
In response to ECPG and dynamic SQL  (Cliff Wells <LogiplexSoftware@earthlink.net>)
Responses Re: ECPG and dynamic SQL  (Cliff Wells <LogiplexSoftware@earthlink.net>)
List pgsql-interfaces
Cliff Wells schrieb:
> On Mon, 2002-07-29 at 16:37, Jim Parker wrote:
> 
>>The app GtkSQL does what you need, but it is implimented in libpq.  It will
>>give you a general idea of how to do it.
>>
>>Do a google search.
>>
>>There is another app that is similar (libpq also) a little less complex, so
>>easier to follow, called dbui-0.4.0  A Google search will give you a URL
> 
> 
> Yeah, I was afraid there was no way to do it using ecpg... oh well.  
> 
> Thanks for the info.

Of course there is a way to do it in ecpg! Ecpg simply does not provide 
the (IMO) overloaded sqlda interface but uses the new lean get 
descriptor interface (SQL standard). See interfaces/ecpg/tests/dyntest* 
for an example.
    Christof

PS: If you want to use this: you can even fetch into a char **results=0; 
but have to free the array afterwards.



pgsql-interfaces by date:

Previous
From: Jakub Ouhrabka
Date:
Subject: ecpg and listen/notify
Next
From: Cliff Wells
Date:
Subject: Re: ECPG and dynamic SQL