pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jackson, DeJuan <djackson@cpsgroup.com>
To: Bill Brandt <brandtwr-pgsql@draaw.net>
To: 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
Message-ID: <F10BB1FAF801D111829B0060971D839F26D941@dal_cps.cpsgroup.com> (raw)

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" %>
> <!--#include file="ADOVBS.inc"-->
> <!--#include file="IASUtil.asp"-->
> <%
> 	Set Connection = Server.CreateObject("ADODB.Connection")
> 	Connection.Open "DSN=network"
>         SQLStmt = "select addr "
> 	SQLStmt = SQLStmt & "from hostname"
> 	Set RS = Connection.Execute(SQLStmt)
> %>
> <html><head><meta http-equiv="expires" content="1-1-1997">
> <title></title></head>
> <body bgcolor="FFFFFF">
> <center><font face="arial"><font size="6"><b>Test
> </b></font></center>
> <% Do While Not RS.EOF %>
> <p><%= RS("addr") %></p>
> <% RS.MoveNext
>    Loop
> %>
> </body>
> </html>
> <% 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



Message-ID: <F10BB1FAF801D111829B0060971D839F26D941@dal_cps.cpsgroup.com>
Permalink:  ../F10BB1FAF801D111829B0060971D839F26D941@dal_cps.cpsgroup.com/
Also on:    postgresql.org/message-id/F10BB1FAF801D111829B0060971D839F26D941@dal_cps.cpsgroup.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-interfaces@postgresql.org
  Cc: djackson@cpsgroup.com, brandtwr-pgsql@draaw.net, pgsql-questions@postgreSQL.org
  Subject: Re: [QUESTIONS] postgres odbc ipaddresses and asp
  In-Reply-To: <F10BB1FAF801D111829B0060971D839F26D941@dal_cps.cpsgroup.com>
  References: <F10BB1FAF801D111829B0060971D839F26D941@dal_cps.cpsgroup.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