RE: [QUESTIONS] postgres odbc ipaddresses and asp

Поиск
Список
Период
Сортировка
Искать

RE: [QUESTIONS] postgres odbc ipaddresses and asp

От:
"Jackson, DeJuan" <djackson@cpsgroup.com>
Дата:
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
FAQ