图片传不上来,我就描述吧.
DATA CONNECTIONS中已经加上了ODBC.127.0.0.1 .子目录下的Tables已经有了我的表table1,我怎么样才能操作呢?
需要怎么配置ODBC吗?代码怎么编呢?
没用过C#,也没搞过数据库.谢谢各位的帮忙了.

解决方案 »

  1.   

                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);
                }
    这是我上网找的代码,但是不行.
    需要怎么配置,using什么才能用呢?