postgresql odbc
C#
1
Posts
1
Posters
0
Views
1
Watching
-
has anyone got postgres and odbc working? im trying the whole day...the code seem ok (no error reporting)..but i cant get or put any data to database. im runnig postgres on linux server. i tried from pgAdmin with same SQL command and working..mhh..any idea? (i have postgresql odbc clinet installed) string pgConnectionString = "DRIVER={PostgreSQL};" + "SERVER=192.168.1.100;" + "DATABASE=test;" + "UID=postgres;" + "PASSWORD=postgres;"; OdbcConnection pgConn = new OdbcConnection(pgConnectionString); try { pgConn.Open(); } catch (OdbcException eee) { error-handing(eee) } string SQL = "INSERT INTO data VALUES(default, '123', '1qwer', 'qwrwrw')"; OdbcDataAdapter myAdapter = new OdbcDataAdapter(SQL,pgConn); pgConn.Close();