Problem inserting image
- From: Tk421 <vrobador(at)gmail(dot)com>
- To: sql pgsql <pgsql-sql(at)postgresql(dot)org>
- Subject: Problem inserting image
- Date: Mon, 22 Dec 2008 21:08:20 +0100
- Message-id: <494FF3B4.9000201@gmail.com> <text/plain>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
I've made a routine in VB to insert a image into a table. The code
is:<br>
<br>
<small>Set cmd = New ADODB.Command<br>
cmd.ActiveConnection = objconexion<br>
cmd.CommandText = "INSERT INTO tb_tmp_ventanas (ventana)
VALUES (?)"<br>
archivo = "c:\image.jpg"<br>
fd = FreeFile<br>
Open archivo For Binary Access Read As fd<br>
flen = LOF(fd)<br>
Set imagen = cmd.CreateParameter("imagen", adLongVarBinary,
adParamInput, flen)<br>
ReDim chunk(1 To flen)<br>
Get fd, , chunk()<br>
imagen.AppendChunk chunk()<br>
cmd.Parameters.Append imagen<br>
Set rsInsert = cmd.Execute<br>
Close</small><br>
<br>
<br>
But on execute there is the next error: ERROR: type "lo" does not
exist;<br>
<br>
How can i reference the "lo" type or create it, in postgres 8.3<br>
<br>
Thank you very much<br>
</body>
</html>
Home |
Main Index |
Thread Index