From: | Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com> |
---|---|
To: | Michael Aldor <MAldor(at)greenridge(dot)ca>, pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: ADO Connection with Postgres |
Date: | 2004-07-17 15:27:20 |
Message-ID: | 20040717152720.23573.qmail@web20825.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
--- Michael Aldor <MAldor(at)greenridge(dot)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/
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2004-07-17 15:39:51 | Re: ADO Connection with Postgres |
Previous Message | Michael Aldor | 2004-07-16 23:54:56 | ADO Connection with Postgres |