Page 1 of 1

Identity Field Lost, when i make a post to the table

Posted: Thu 17 Mar 2005 22:25
by gilbosun
Hello:

Well, i have a litle problem when i do a post for the current table, i want to mention, that i don't use then INSERT like everyone use it, i only have a customer table, when i insert a new one, and click on the post button, the record is saved to the corresponding table, but the identity field appears with blank information, all the others fiels seems to be fine, but in my preview, don't.

Anyone can helpme with that

Posted: Fri 18 Mar 2005 10:47
by Ikar
What are your values of SQLInsert and Options.QueryIdentity?

Identity Field Lost, when i make a post to the table

Posted: Fri 18 Mar 2005 16:35
by gilbosun
Hello:

Well, in fact i don't have any value for SQLInsert, because i never use it, i only match (in the server side) a TMSQuery with a DataSetProvider, and/on the client side i put a ClientDataSet with the corresponding DataSource, and then inside the code i put a close/open for the ClientDataSet, to obtain all the fields of the table.

Finally i tried to insert a record and works fine, but when i trid with another one, that's it the program indicate a key violation, because the identity field doesn's have any value.

By the way for the Options.QueryIdentity is checked to true???


Thanks

Posted: Mon 21 Mar 2005 09:27
by Ikar
Identity-fields are a little applied for MIDAS applications.Try to use instead of these fields another method of generating unique key. For example, GUID.