Re: Reg:Connection Object

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Reg:Connection Object
Дата
Msg-id 20050902051613.GB59734@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Reg:Connection Object  ("sandhya" <sandhyar@amiindia.co.in>)
Список pgsql-admin
On Fri, Sep 02, 2005 at 09:56:19AM +0530, sandhya wrote:
> I am using normal C-Functions,In one function i will make connection with
> the database.This connection object i need to get in my all other functions
> where i will do the other operations like creating a table ,altering a table
> in their respective functions.So..There is no need for me to ask the user to
> pass the user ,password,database name in all other functions.Pls suggest me

Do you mean you're writing C code using libpq?  If so, why can't
you just pass the PGconn * as another argument to your functions?
Or use a global variable (although some programmers would consider
that bad style)?  It's not clear what difficulties you're having.

--
Michael Fuhr

В списке pgsql-admin по дате отправления:

Предыдущее
От: "sandhya"
Дата:
Сообщение: Re: Reg:Connection Object
Следующее
От: "sandhya"
Дата:
Сообщение: Re: Reg:Connection Object