Re: Can PostgreSQL be used with ASP or .NET?
От | aaasssxxx@hotmail.com (aaasssxxx) |
---|---|
Тема | Re: Can PostgreSQL be used with ASP or .NET? |
Дата | |
Msg-id | a5edacdd.0202112115.5facd9ee@posting.google.com обсуждение исходный текст |
Список | pgsql-general |
"Chad Chenoweth" <cchenowe@mines.edu> wrote in message news:<wDz78.19391$ym3.63838@rwcrnsc51.ops.asp.att.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 > >
В списке pgsql-general по дате отправления: