[Mono-devel-list] Problem with connecting to Postgress

Umashankar Ashwathnarayanan umashankara at dpsl.net
Tue Feb 1 10:49:49 EST 2005


Hi
     I want to connect to Postgres  7.3.2 through C# in Mono.

I tried this code , but i could not connect to server .
 so plz help me.

172.16.1.16 = Server IP

the Data Base was created on
       createdb kumar ;
       then create table was executed
    connection to postgres is made via
     su - postgres



      string connectionString =
                  "Provider=PostgreSQL;" +
                  "Addr=172.16.1.16;" +
                  "Database=demo_merlion;" +
                  "User ID=;" +
                  "Password=";
                 
            
         
           
               OleDbConnection dbcon = new 
OleDbConnection(connectionString);
              
              
                dbcon.Open();

Kumar



More information about the Mono-devel-list mailing list