Received: from bjke.com (firewall-user@ganymede.bjke.com [144.210.8.38]) by hub.org (8.8.8/8.7.5) with ESMTP id NAA10520; Tue, 5 May 1998 13:25:51 -0400 (EDT) Received: by bjke.com; id NAA22840; Tue, 5 May 1998 13:25:28 -0400 (EDT) Received: from cpsmail.cpsgroup.com(144.210.12.11) by gauntlet.bjke.com via smap (3.2) id xmaa22440; Tue, 5 May 98 13:24:59 -0400 Received: by dal_cps.cpsgroup.com with Internet Mail Service (5.0.1458.49) id ; Tue, 5 May 1998 12:26:04 -0500 Message-ID: From: "Jackson, DeJuan" To: Bill Brandt , pgsql-questions@postgreSQL.org Cc: pgsql-interfaces@postgreSQL.org Subject: RE: [QUESTIONS] postgres odbc ipaddresses and asp Date: Tue, 5 May 1998 12:26:02 -0500 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain Forwarded to INTERFACES. > -----Original Message----- > From: Bill Brandt [SMTP:brandtwr-pgsql@draaw.net] > Sent: Saturday, May 02, 1998 9:39 AM > To: pgsql-questions@postgreSQL.org > Subject: [QUESTIONS] postgres odbc ipaddresses and asp > > I have an application where an Intranet running on IIS serves as a > front-end to databases on MS SQL and postgreSQL. I wrote the > following > asp to access a postgres database where addr is a field of type ipaddr > from the ip_and_mac in the contrib dir. Selects performed through > psql > work fine and the asp modified to return the field name which is > varchar(20) works fine. > > <%@ LANGUAGE="VBScript" %> > > > <% > Set Connection = Server.CreateObject("ADODB.Connection") > Connection.Open "DSN=network" > SQLStmt = "select addr " > SQLStmt = SQLStmt & "from hostname" > Set RS = Connection.Execute(SQLStmt) > %> > > > >
Test >
> <% Do While Not RS.EOF %> >

<%= RS("addr") %>

> <% RS.MoveNext > Loop > %> > > > <% Connection.Close %> > > Since a varchar returns correctly, I believe the problem is related to > the > format of the ipaddr type coming from the odbc connector. I end up > with a > session of postmaster that hangs around on the database box and the > browser sees: > > error 'ASP 0115' > Unexpected error > > /scripts/test.asp > > A trappable error occurred in an external object. The script cannot > continue running. > > Note: This is something related to ipaddr and asp not ipaddr and odbc > because the same table can be imported into Excel without any > problems. > > Has anyone seen this problem before? Any suggestions? > > -- > Bill Brandt > brandtwr@draaw.net http://www.draaw.net/ > -- > Official WWW Site: http://www.postgresql.org > Online Docs & FAQ: http://www.postgresql.org/docs > Searchable Lists: http://www.postgresql.org/mhonarc