You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i use NpgsqlCommandBuilder with NpgsqlDataAdapter i always want to configure update,insert,delete commands. Earlier when i used Npgsql 2.0.1.0 version this code works fine:
DataTablet=newDataTable();NpgsqlConnectioncon=newNpgsqlConnection("some connection string");con.Open();NpgsqlDataAdapteradp=newNpgsqlDataAdapter("select id,description from device",con);//where id is primary keyadp.Fill(t);NpgsqlCommandBuilderbld=newNpgsqlCommandBuilder(adp);DataRowr=t.NewRow();r[0]=300001;t.Rows.Add(r);DataRow[]rows=newDataRow[1];rows[0]=r;adp.Update(rows);con.Close();
Now with Npgsql 2.0.14.3 this code doesn`t work and all our projects must be changed because we have
InvalidOperationException
Now we must everywhere where we use Adapter and Builder before adp.Update() do this:
I am testing PostreSQL coming from MySql and I got this same error. At least, I know how to work around the problem now until it is fixed. In my case it was also bound to a Datagridview.
Activity
GaryK4 commentedon Apr 8, 2014
I am testing PostreSQL coming from MySql and I got this same error. At least, I know how to work around the problem now until it is fixed. In my case it was also bound to a Datagridview.
franciscojunior commentedon Apr 8, 2014
Nice, @GaryK4 !
I'll work on this issue.
roji commentedon Jul 21, 2014
@franciscojunior, I'll take a look at this in the coming days...
Unit test to reproduce npgsql#179
Fix CommandBuilder event registration
roji commentedon Jul 26, 2014
@czarnul, @neonsnowball, this bug has been fixed in master. You can download the latest binaries from our build server and confirm.
Unit test to reproduce #179
Fix CommandBuilder event registration