Delphi5, Pervasive and Identity field type

Delphi5, Pervasive and Identity field type

Post by Alberto Salvat » Wed, 27 Mar 2002 02:05:51



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.Mailgate.ORG

 
 
 

Delphi5, Pervasive and Identity field type

Post by curio » Wed, 27 Mar 2002 15:22:11



> 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.

 
 
 

Delphi5, Pervasive and Identity field type

Post by Evgeny V. Levasho » Wed, 27 Mar 2002 15:39:08


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?
 
 
 

Delphi5, Pervasive and Identity field type

Post by Evgeny V. Levasho » Wed, 27 Mar 2002 16:10:30


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 :)
 
 
 

Delphi5, Pervasive and Identity field type

Post by Alberto Salvat » Wed, 27 Mar 2002 23:58:13


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

 
 
 

1. DTS error on Identity type when there is no source field

Hello out there!

I have a DTS package that imports data from a table in Sqlbase using the
Centrua ODBC driver.

The receiving table has an Identity column named ROWID with a seed and
increment of 1 and 1.

On the option tab of the transformation, the enable identity insert checkbox
is cleared and no column from the source table is mapped to the
idendity field.

Tha package fails stating the an identity field can not have a null value
inserted, it seems not to observe the identity insert checkbox being cleared
.

I am running Sql 2000 Sp2 entreprise on Windows 2000 server Sp3.

Any body run into this or know away arroud it.

Thanks,

George Brown

2. nodefault: what is it?

3. To add a field of the type Dates with a field of the Whole type

4. Grid text won't print! Help

5. Can I toggle a field IDENTITY / NOT IDENTITY using T-SQL

6. Data Warehousing Track at Informix's User Conference

7. Identity field that's not really Identity

8. Books Online Inconsistency about LOCKING - HOLDLOCK is equivalent to SERIALIZABLE ??

9. Attempt to insert duplicate identity values in table (has identity and key fields)

10. Pervasive SQL/Btrieve User defined Data types

11. Pervasive.SQL 2000 and Lstring data type

12. New Pervasive data types (v8)

13. Date data types (pervasive and intersolve ODBC driver)