X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CB814D1B386 for ; Sat, 17 Jul 2004 12:27:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 68971-09 for ; Sat, 17 Jul 2004 15:27:26 +0000 (GMT) Received: from web20825.mail.yahoo.com (web20825.mail.yahoo.com [216.136.227.164]) by svr1.postgresql.org (Postfix) with SMTP id 7FDE1D1B374 for ; Sat, 17 Jul 2004 12:27:21 -0300 (ADT) Message-ID: <20040717152720.23573.qmail@web20825.mail.yahoo.com> Received: from [24.252.83.152] by web20825.mail.yahoo.com via HTTP; Sat, 17 Jul 2004 08:27:20 PDT Date: Sat, 17 Jul 2004 08:27:20 -0700 (PDT) From: Jeff Eckermann Subject: Re: ADO Connection with Postgres To: Michael Aldor , pgsql-odbc@postgresql.org In-Reply-To: <84D4D76946AC2F43AA9BDCD860DC66754FB277@voyager.greenridge-int.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200407/79 X-Sequence-Number: 4212 --- Michael Aldor 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=;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("

" & 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/