如题,我用的postgresql是8.1
谢谢帮忙,万分感谢.

解决方案 »

  1.   

    用.net来连接,我在网上看的            
    Microsoft.Data.Odbc.OdbcConnection oODBCConnection;
                string sConnString = "Driver={PostgreSQL};Server=127.0.0.1;Port=5432;Database=test1;Uid=postgres;Pwd=chenqing5151!";
                oODBCConnection = new OdbcConnection(sConnString);
                try
                {
                    oODBCConnection.Open();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                string strSQL = "select   *   from   employees";
                OdbcDataAdapter da = new OdbcDataAdapter(strSQL, oODBCConnection);
                System.Data.DataSet ds = new System.Data.DataSet();
                da.Fill(ds, "Employees");
                dataGrid1.DataSource = ds.Tables["Employees"];需要包含什么头文件吗?   
      

  2.   

    参考:
    http://www.samool.com/archives/255/
    有ODBC驱动及连接图例