Internet

Поиск
Список
Период
Сортировка
От Nombre y Apellidos
Тема Internet
Дата
Msg-id 200001181634.RAA10000@alumnos.uc3m.es
обсуждение исходный текст
Список pgsql-interfaces
Michael Meskes:
> On Wed, Jan 12, 2000 at 07:10:57PM -0500, Nombre y Apellidos wrote:
> > In my program in C with embedded SQL, I am trying to use a cursor for
> > a query. 
> > The new syntax of FETCH is :
> > EXEC SQL FETCH FROM cursor_name INTO :variable_name
> > 
> > But I receive the following message of error when I execute my program:
> >     Segmentation default 
> 
> Ouch. Segmentation fault means the program tries to access invalid memory.
> You can get it for instance if the variable is not correctly defined.
> 
> > When I worked with a previous version I wrote:
> > EXEC SQL FETCH cursor_name INTO :variable_name
> 
> Yes, this syntax was supported and may be supported again in the future.
> Right now our parser does not like it due to shift/reduce conflicts. But I'm
> working on it.
> 
> > What is the correct syntax?
> 
> Using FROM is and will be correct.
> 
> > How can I use the command FETCH?
> 
> The above mentioned statement ie correct given that you did declare the
> cursor in advance. Please check the test file in the source tree for some
> examples.
> 
> > Is always neccessary to include the embedded SQL commands in 
> > transaction blocks?
> 
> Yes and No. It depends on what you mean exactly. ECPG by default starts a
> transaction every time the connection starts resp. the open transcation is
> committed or rolled back.
> 
> What you can do is start ecpg with option '-t' or issue an exec sql set
> autocommit=on to disable that feature. Then you have to manually start a
> transaction if you need one. However, you cannot work without a transaction
> since the backend executes statements only if they are embedded in a
> transaction. If you do not have an open transaction the backend will start
> one prior to executing your command and immediately after finishing this
> transaction will be committed.
> 
> Hope this helps.
> 
> Michael
> -- 
> Michael Meskes                         | Go SF 49ers!
> Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
> Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
> Email: Michael@Fam-Meskes.De           | Use PostgreSQL!
>
I am Ana Isabel Canales from Spain, Universidad Carlos III of Madrid.
I received your email answering my problems with ecpg.
Thanks for your answer because it was very useful for me. I am working in my end of studies project of Industrial
Engineering.
 
My project is about a database applied to a flexible manufacturing cell, and I am working with PostgreSQL.
It would be very useful for me to have communication with the PostgreSQL Team because I am having some difficulties.
Perhaps, you can´t help me, but I would like to know how I can connect and access my database from the Internet.
I want to connect my database with a HTML page.
What is the easier form to connect my database from Netscape for example?
I´ve heard something about apache and php, but I am trying it and it doesn´t work.
Can you help me?

Thanks for all.

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

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: [INTERFACES] Setup of PGAdmin
Следующее
От: Dave Page
Дата:
Сообщение: RE: [INTERFACES] Setup of PGAdmin