[Mono-list] Update command does not include schema

Andrus kobruleht2 at hot.ee
Mon Aug 28 12:08:33 EDT 2006


Update command generated in MONO for PostgeSQL does not include
schema name before table name.

The following code running under MONO 1.1.16.1 in Windows returns

update "mytable" set ....

but when running under .NET it returns correctly schema also:

update "myschema"."mytable" set ...


How to force mono to add schema name to update command ?

Andrus.


private void Form1_Load(object sender, EventArgs e)
        {
...
this.npgsqlCommand1.CommandText = "select * FROM myschema.mytable order by 
1";
this.npgsqlDataAdapter1.Fill(this.dataSet1);
}

private void button1_Click(object sender, EventArgs e)
{

Npgsql.NpgsqlCommandBuilder builder;

builder = new Npgsql.NpgsqlCommandBuilder(this.npgsqlDataAdapter1);
this.npgsqlDataAdapter1.InsertCommand = 
builder.GetUpdateCommand(this.dataSet1.Tables[1].Rows[1]);
MessageBox.Show(this.npgsqlDataAdapter1.UpdateCommand.CommandText.Substring(0,50) 
 );
}



More information about the Mono-list mailing list