RE: [QUESTIONS] postgres odbc ipaddresses and asp
От | Jackson, DeJuan |
---|---|
Тема | RE: [QUESTIONS] postgres odbc ipaddresses and asp |
Дата | |
Msg-id | F10BB1FAF801D111829B0060971D839F26D941@dal_cps.cpsgroup.com обсуждение исходный текст |
Список | pgsql-interfaces |
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
В списке pgsql-interfaces по дате отправления: