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

From: Fernando(dot)Figueiredo(at)vivo(dot)net(dot)br
To: pgsql-hackers(at)postgresql(dot)org
Subject: Key violation. ERROR: type "lo" does not exist.
Date: 2005-10-19 13:45:28
Message-ID: 06AAC9BEDC6A9E4B88D28FF1035B87874C5480@cabaksede01.tco.net.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?



Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2005-10-19 14:05:53 Re: 2nd try @NetBSD/2.0 Alpha
Previous Message Martijn van Oosterhout 2005-10-19 13:29:24 Re: Question about Ctrl-C and less