Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <packages>
  2. <package id="Dapper" version="1.50.2" targetFramework="net45" />
  3. <package id="Npgsql" version="3.1.7" targetFramework="net45" />
  4. </packages>
  5.  
  6. var sqlBuilder = new NpgsqlConnectionStringBuilder
  7. {
  8. Host = host,
  9. Database = database,
  10. Username = user,
  11. Password = password,
  12. Pooling = false,
  13. ClientEncoding = "SQL_ASCII"
  14. //Tentei "UNICODE", "utf8", "win-1252"
  15. };
  16.  
  17. // Tentei: SQL_ASCII, win-1252, unicode
  18. connection.Execute("set client_encoding = 'SQL_ASCII'");
  19.  
  20. var data = connection.Query<T>(strSQL);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement