The following bug has been logged online:
Bug reference: 1562
Logged by: Stefan Taube
Email address: 2004@Stefan-Taube.de
PostgreSQL version: 8.0.1
Operating system: Windows XP Home
Description: OdbcDataAdapter.Update Fails
Details:
Hi,
the Update Command of an OdbcDataAdapter fails with an error saying the
Select command didnt deliver column info. Same code works with DB2, Oracle
and MySQL, so i think its a problem with the PostGre ODBC driver.
Any ideas?
Greetings,
Stefan
SQL:
Create Table Test ( ID INTEGER NOT NULL, DATA_INT INTEGER, primary
key(ID) );
Insert Into Test Values( 1, 4 );
Commit;
C#:
DS = new DataSet();
CO = new OdbcConnection("DSN=POSTGRE;UID=SCOTT;PWD=TIGER");
CO.Open();
DA = new OdbcDataAdapter("Select * from Test Where Id = 1",CO);
new OdbcCommandBuilder(DA);
DA.Fill(DS);
DS.Tables[0].Rows[0]["DATA_INT"] = 5;
DA.Update(DS); // <<-- This fails
CO.Close();