Hi,
I have a auto generated(serial) datafield in a table, whose value I want to fetch back to front end, in the datatable. I have configured the RefreshingFields and RefreshMode properties for the PgSqlDataTable. On calling the Update method, everything works fine, i.e. the record gets inserted successfully but I am not able to fetch back the new, auto-generated value back.
I am currently using the evaluation copy of the provider and we(my company) is willing to purchase this provider on my recommendation, once we evaluate the required features.
Thanks, and waiting for your reply.
PgSqlDataTable.RefreshingFields not working for me.
I am now facing another issue and need help:
Consider the two tables, namely Categories and Sub-Categories, they are linked to each other by CategoryID. Now both the tables have auto generated columns(serial), for Categories it is CategoryID and for Sub-Categories it is Sub-CategoryID. I have configured a PgSqlDataSet which contains two PgSqlDataTable. The DataSet also contains a relationship between this two tables on CategoryID, named Relation1.
Now I want to forward the auto-generated and fetched value for CaregoryID of Categories table to the Child Rows, the rows which belongs to Sub-Categories table. How can I achieve this?
Waiting for your reply, Thanks.
Consider the two tables, namely Categories and Sub-Categories, they are linked to each other by CategoryID. Now both the tables have auto generated columns(serial), for Categories it is CategoryID and for Sub-Categories it is Sub-CategoryID. I have configured a PgSqlDataSet which contains two PgSqlDataTable. The DataSet also contains a relationship between this two tables on CategoryID, named Relation1.
Now I want to forward the auto-generated and fetched value for CaregoryID of Categories table to the Child Rows, the rows which belongs to Sub-Categories table. How can I achieve this?
Waiting for your reply, Thanks.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
As I can understand, you need to
1) retrieve the generated CategoryID field of the newly inserted row in Categories;
2) update the rows in Sub-Categories setting their CategoryID fields to CategoryID from the first point.
The first point can be done using the RefreshingFields and RefreshMode properties, to perform the second one you need to execute UpdateCommand of corresponding PgSqlDataTable.
Please tell us if you are encountering any problems with this.
1) retrieve the generated CategoryID field of the newly inserted row in Categories;
2) update the rows in Sub-Categories setting their CategoryID fields to CategoryID from the first point.
The first point can be done using the RefreshingFields and RefreshMode properties, to perform the second one you need to execute UpdateCommand of corresponding PgSqlDataTable.
Please tell us if you are encountering any problems with this.