SqlDatatable - Help

SqlDatatable - Help

Postby cmauricio » Sat 13 Feb 2016 14:42

Hi people,I´m a delphi heavy user and i´m starting winforms app inside vs 2015, and i need a help
i´m using a pgsqldatatable and i´d to do some crud operations as i write at delphi, it´s possible?

example: pgSqlCadUsuarios.Rows.Add(); starts a new row
but i don´t know how to commit, by the way, is a postgresql table with trigger to fill pk!!

and edit and delete and how to cancel the insert and edit, how can i do it?

i searched but i didn´t find any example

another example:
if (BtnNovo.Text == "Novo")
{
BtnNovo.Text = "Gravar";
habilitaCampos();
pgSqlCadUsuarios.Active = true;
pgSqlCadUsuarios_perfil_codigo.AllowDBNull = true;
pgSqlCadUsuarios.Rows.Add();




}

else
{
BtnNovo.Text = "Novo";
desabilitaCampos();
pgSqlCadUsuarios.GetChanges();
pgSqlCadUsuarios.AcceptChanges();
}

but is not working because of trigger
cmauricio
 
Posts: 1
Joined: Sat 13 Feb 2016 13:37

Re: SqlDatatable - Help

Postby Pinturiccio » Mon 15 Feb 2016 13:59

Please provide us the following information:
1. The exception message and stack trace;
2. The DDL/DML scripts of the table with the trigger, which reproduces the issue.

Please create and send us a small sample project, reproducing the issue.

Besides, we supply Samples together with dotConnect for PostgreSQL. There are several samples, related to PgSqlDataTable, which can be useful for you. Samples are located in the folder with dotConnect for PostgreSQL 'C:\Program Files (x86)\Devart\dotConnect\PostgreSQL\Samples\General\' or in 'Start Menu->All Programs->Devart dotConnect for PostgreSQL->Samples->General'. For more information, please refer to http://www.devart.com/dotconnect/postgresql/docs/?Samples.html
Pinturiccio
Devart Team
 
Posts: 2025
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for PostgreSQL