pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: Michael Aldor <MAldor@greenridge.ca>
To: pgsql-odbc@postgresql.org
Subject: Re: ADO Connection with Postgres
Date: Sat, 17 Jul 2004 08:27:20 -0700 (PDT)
Message-ID: <20040717152720.23573.qmail@web20825.mail.yahoo.com> (raw)
In-Reply-To: <84D4D76946AC2F43AA9BDCD860DC66754FB277@voyager.greenridge-int.ca>

--- Michael Aldor <MAldor@greenridge.ca> wrote:
> Hello,
> 
> I am trying to connect to a postgres database in ASP
> (vbscript) and insert a blob into a bytea field.
> However I cannot create an open connection via the
> following method.
> 
> Any help/suggestions would be appreciated.
> 
> ConnectionString =
>
"Driver={PostgreSQL};Server=<servername>;Port=5432;Database=imagedb;UID=imageUser"
> 
> Set rs = Server.CreateObject("ADODB.Recordset")
> rs.Open "image_table", connectionString,
> adOpenKeyset, adLockOptimistic, adCmdTable

Try doing "select * from image_table", instead of just
attempting to open the table.

> 'After I run rs.open the following error eheck gives
> me the following error:
> if err then
>   response.write("<br><br>" & err.Description & "
> errorNum= " & Err.number)
> end if
> 'Arguments are of the wrong type, are out of
> acceptable range, or are 
> 'in conflict with one another. errorNum= 3001 
> 'not sure what to change there
> rs.begintrans
> rs.AddNew
>  rs("img_name") = nameRef 'name of the file
>  rs("img").AppendChunk fileData 'file data being
> some binary data
> rs.Update
> rs.committrans
> rs.Close
> Set rs = Nothing
> 
>
-------------------------------------------------------------------------------------------------------------------
> This communication, including its attachments, if
> any, is intended solely
> for the recipient; it is confidential and may
> contain personal or private
> information, or proprietary and/or privileged
> material. As such, any
> unauthorized use, retention, copying, disclosure or
> other distribution of
> this communication, or the taking of any action in
> reliance on its contents
> is strictly prohibited. If you have received this
> communication in error,
> please notify us immediately and delete this
> communication (and any
> attachments.)
> 
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
> 



		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/




view thread (6+ messages)  latest in thread

Message-ID: <20040717152720.23573.qmail@web20825.mail.yahoo.com>
Permalink:  ../20040717152720.23573.qmail@web20825.mail.yahoo.com/
Also on:    postgresql.org/message-id/20040717152720.23573.qmail@web20825.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: jeff_eckermann@yahoo.com, MAldor@greenridge.ca
  Subject: Re: ADO Connection with Postgres
  In-Reply-To: <20040717152720.23573.qmail@web20825.mail.yahoo.com>
  References: <84D4D76946AC2F43AA9BDCD860DC66754FB277@voyager.greenridge-int.ca> <20040717152720.23573.qmail@web20825.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox