RE: [QUESTIONS] postgres odbc ipaddresses and asp

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: Bill Brandt <brandtwr-pgsql(at)draaw(dot)net>, pgsql-questions(at)postgreSQL(dot)org
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: RE: [QUESTIONS] postgres odbc ipaddresses and asp
Date: 1998-05-05 17:26:02
Message-ID: F10BB1FAF801D111829B0060971D839F26D941@dal_cps.cpsgroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Forwarded to INTERFACES.

> -----Original Message-----
> From: Bill Brandt [SMTP:brandtwr-pgsql(at)draaw(dot)net]
> Sent: Saturday, May 02, 1998 9:39 AM
> To: pgsql-questions(at)postgreSQL(dot)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(at)draaw(dot)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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Benoit Foucher 1998-05-05 22:36:15 [INTERFACES] ODBC: Problem with Fetching records
Previous Message Jackson, DeJuan 1998-05-05 15:22:45 RE: [QUESTIONS] problem with pgaccess