Delphi5, Pervasive and Identity field type 
Author Message
 Delphi5, Pervasive and Identity field type

Hi, list!
Exist a mode to get a new identity field value after a insert
without call dataset refresh?

TIA

AS

--
Posted via Mailgate.ORG Server - http://www.*-*-*.com/



Sat, 11 Sep 2004 01:05:51 GMT  
 Delphi5, Pervasive and Identity field type

Quote:

> Exist a mode to get a new identity field value after a insert
> without call dataset refresh?

By Identity I mean MS SQL Identity field type.
This depends on what your application is based - BDE or ADO.
On ADO after Table.Post value can be retrieved by simple
Table.Fieldbyname('SOME_NAME').asinteger.
On BDE - really I don't remember, may be the above mentioned is correct
for BDE. If not - use Table.Prior (or Table.First) Table.Next (or Table.Last)
sequence before using Table.Fieldbyname('SOME_NAME').asinteger.
You may also try methods which are updating record buffer but I think they
will not work.


Sat, 11 Sep 2004 14:22:11 GMT  
 Delphi5, Pervasive and Identity field type

Quote:
> Hi, list!
> Exist a mode to get a new identity field value after a insert
> without call dataset refresh?

   What a database server are you using?


Sat, 11 Sep 2004 14:39:08 GMT  
 Delphi5, Pervasive and Identity field type
Quote:
> > Hi, list!
> > Exist a mode to get a new identity field value after a insert
> > without call dataset refresh?

>    What a database server are you using?

I'm sorry, didn't see the subject line :)


Sat, 11 Sep 2004 15:10:30 GMT  
 Delphi5, Pervasive and Identity field type

Quote:
> By Identity I mean MS SQL Identity field type.

I don't know M$Sql.

On Pervasive, identity field is assigned server side.
I use bde and, at this moment, to get field value i need
to call a refresh (query.close;query.open) or

This return last identity value used in active session.

Bye

AS

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG



Sat, 11 Sep 2004 22:58:13 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Paradox autoinc fields vs MS SQL identity fields

2. Problem with SQL 6.5 identity fields

3. Identity Fields in SQL

4. Delphi2.0,Sybase & Identity Field

5. how to handle identity fields and mssql server??

6. Unable to insert to MS-SqlServer table with IDENTITY field

7. HELP!!: Identity/AutoInc fields + BDE...

8. ms-sql-server identity field with delphi3

9. Problem with Identity field in Delphi 2, with ODBC SQL server 6.5 link

10. Insert record w/SQL Server identity field

11. MS SQL 6.5 and Identity fields

12. Money field type same as Currency data type??

 

 
Powered by phpBB® Forum Software