如题..
急求连接字符串:
我使用
Provider=PostgreSQL;Host=localhost; port=5432; Database=postgres;Userid=postgres;Password=xx;_com_error::Description returned {"FATAL:  no PostgreSQL user name specified in startup packet
" (1)}userid 换成 username  user id  都是这样.

解决方案 »

  1.   

    我是在windows下的postgres
    你可以试一下,这是一个无源连接的字符串
    strConn = "Provider=MSDASQL.1;Password=postgres;User ID=postgres;Extended Properties=DRIVER={PostgreSQL};DATABASE=htid;SERVER=192.168.0.1;PORT=5432;UID=user;PWD=pass;TextAsLongVarchar=0;ByteaAsLongVarBinary=1";
      

  2.   

    Postgresql的ado驱动问题比较多,建议使用ado+odbc
      

  3.   

    --tryProvider=MSDASQL.1;Password=postgres;User ID=postgres;Extended Properties=DRIVER={PostgreSQL};DATABASE=htid;SERVER=192.168.0.1;PORT=5432;UID=user;PWD=pass