Skip site navigation (1) Skip section navigation (2)

Re: Connection String in ASP.NET application

From: wireless200(at)yahoo(dot)com (wireless)
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Connection String in ASP.NET application
Date: 2003-09-17 13:07:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
roslyn(at)crimsonworks(dot)com(dot)sg ("Roslyn Teo") wrote in message news:<002901c37b7a$e100abd0$5201a8c0(at)rospc>...
> Can anyone kindly enlighten me on how to write a connection string from
> an ASP.NET application to PostgreSQL db without the use of Npgsql or
> other data providers?

You can use odbc but I use npgsql: 

using Npgsql;

String connstring = "Server=xx.xx.xx.xx;Port=5432;User

NpgsqlConnection conn = new NpgsqlConnection(connstring);

DataSet ds = new DataSet();

You can do all the .net stuff with npgsql.  They've done a good job
with it.

Just download the npgsql.dll and add it to your web bin directory and
add a reference in your project.

If you want to use odbc just do some searches on google.  There a few
how to articles but it's more complicated than npgsql.


In response to

pgsql-novice by date

Next:From: Harry BroomhallDate: 2003-09-17 13:54:25
Subject: Schemas, and visibility of tables in MS-Query.
Previous:From: NoelDate: 2003-09-17 03:07:41
Subject: Synchronising databases replication

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group