Lists: | pgsql-novice |
---|
From: | "Roslyn Teo" <roslyn(at)crimsonworks(dot)com(dot)sg> |
---|---|
To: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | Connection String in ASP.NET application |
Date: | 2003-09-15 11:16:53 |
Message-ID: | 002901c37b7a$e100abd0$5201a8c0@rospc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
Hi,
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?
Roslyn
From: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
---|---|
To: | Roslyn Teo <roslyn(at)crimsonworks(dot)com(dot)sg> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Connection String in ASP.NET application |
Date: | 2003-09-16 15:12:02 |
Message-ID: | 1063725122.23527.41.camel@camel |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
On Mon, 2003-09-15 at 07:16, Roslyn Teo wrote:
> Hi,
>
> 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?
>
> Roslyn
Well, my .net knowledge is pretty lite, but as i understand it I believe
you have to use some type of data provider; I'd suggest starting with
the standard ODBC data provider as that one works with postgresql.
Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
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: | 90446ee7.0309170507.47646af8@posting.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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
id=user;Password=password;Database=dbname";
NpgsqlConnection conn = new NpgsqlConnection(connstring);
conn.Open();
DataSet ds = new DataSet();
da.Fill(ds,"mydataset");
conn.Close();
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.
-David