Key violation. ERROR: type "lo" does not exist.

Поиск
Список
Период
Сортировка
От Fernando.Figueiredo@vivo.net.br
Тема Key violation. ERROR: type "lo" does not exist.
Дата
Msg-id 06AAC9BEDC6A9E4B88D28FF1035B87874C5480@cabaksede01.tco.net.br
обсуждение исходный текст
Ответы Re: Key violation. ERROR: type "lo" does not exist.  (Douglas McNaught <doug@mcnaught.org>)
Список pgsql-hackers
Hi ,
 
I need to insert in one database archives JPG.  I am using C++Builder.  How I could make this?
 
I created the following table:
 
CREATE TABLE tbimagens
(
  callid numeric(11) ,
  imagem bytea
)
 
E I try to insert given of the following form:
 
        TQuery *q;
        q = new TQuery(FDatabase1);
        try
        {
            q->DatabaseName = FDatabase1->DatabaseName;
            q->Close();
            q->SQL->Clear();
            q->SQL->Add("insert into tbimagens (callid,imagem) ");
            q->SQL->Add("values (:callid,:imagem) ");
            q->ParamByName("callid")->AsInteger = callid;
            q->ParamByName("imagem")->LoadFromFile(filename,ftBlob);
            q->Prepare();
            q->ExecSQL();
            q->Close();
        }__finally
        {
            delete q;
        }
I receive the mesagem from error: Key violation. ERROR: type "lo" does not exist.
 
Can You help me ? Thank You.
 
ASS: Fernando.
 
 
> --> 
> Hello everyone,

> I have created a table as follows:

> CREATE TABLE document (
> image_id int,
> image bytea
> );

> I want to insert a complete file, let's say an open office document
> into this table.  Anyone know how I would doe this?

You need to use the bytea functions allocated to your language API.
Which language are you using for this?

 
 

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

Предыдущее
От: Katherine Stoovs
Дата:
Сообщение: tuning seqscan costs
Следующее
От: Douglas McNaught
Дата:
Сообщение: Re: Key violation. ERROR: type "lo" does not exist.