Re: Can PostgreSQL be used with ASP or .NET?

From: aaasssxxx(at)hotmail(dot)com (aaasssxxx)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Can PostgreSQL be used with ASP or .NET?
Date: 2002-02-12 05:15:28
Message-ID: a5edacdd.0202112115.5facd9ee@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Chad Chenoweth" <cchenowe(at)mines(dot)edu> wrote in message news:<wDz78(dot)19391$ym3(dot)63838(at)rwcrnsc51(dot)ops(dot)asp(dot)att(dot)net>...
> I've been able to get postgreSQL to work with regular ASP, but have had no
> success getting it to work with ASP .Net. The way I got it to work in
> regular ASP was to first create an ODBC connection to the database. Then
> you can use the recordset and the connection objects. For example, I've
> created an ODBC connection to my database and called it 'ODBC_PostgreSQL'.

do you use DSN or DSN-less?
I think that I am confusion on connect string for DSN-less,
anyone has ideas?

> This connection points to a database that has a single table called
> 'tblTest'. In order to print the data from that table, use the following
> code:
>
> <%
> dim conn ' connection object
> dim rst ' recordset object
> set conn = server.createobject("ADOdb.connection")
> set rst = server.createobject("ADOdb.recordset")
> conn.open "ODBC_PostgreSQL"

what is ODBC_PostgreSQL would be?

> rst.open "Select * from " & chr(34) "tblTest" & chr(34), conn '
> need to put double
>
> ' quotes around the table name.
> 'you now have a recordset that contains all data from tblTest.
> do until rst.eof
> response.write rst.fields("FIELD_NAME") .......
> rst.movenext
> loop
> %>
>
> Hopefully this helps,
>
> -- Chad
>
> FYI: a good ASP website is www.asp101.com
>
>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Berger 2002-02-12 05:52:02 Re: 7.2, JDBC, and case sensitive names
Previous Message Medi Montaseri 2002-02-12 04:49:10 Re: postgresql -- what's in a name?