[Mono-list] Proper data abstraction of Npgsql.NpgsqlCommandBuilder

Andrus kobruleht2 at hot.ee
Sun Sep 3 17:16:22 EDT 2006


How to change the following code so that it works with data providers other 
than npgsql ? Npgsql.NpgsqlCommandBuilder does not implement any common 
interface.
System.Data.ICommandBuilder builder; causes error.


private System.Data.IDbDataAdapter DataAdapter1;

private void button1_Click(object sender, EventArgs e)
{


Npgsql.NpgsqlCommandBuilder builder;

builder = new Npgsql.NpgsqlCommandBuilder(this.DataAdapter1);

this.DataAdapter1.InsertCommand =
      builder.GetInsertCommand(this.dataSet1.Tables[1].Rows[1]);
....
}

Andrus. 



More information about the Mono-list mailing list