Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
  Buy Now
  HXTT Excel v6.1
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

Selecting auto_increment current value when using cached prepares statements
Rob Gansevles
2012-07-09 09:42:20.0

The next generated sequence in a dbf file for an auto_increment does not always get a new value, it is possible to generate duplicate values.

When I run insert code with Prepared statement caching on (ps is not closed), in both our system (Servoy) and another application, the value inserted in the other app is not seen in Servoy.

For example, in Servoy, I create records (id=1, id=2).
Then create a new record using another app (foxpro),: id=3

After this, the next record in Servoy also gets value id=3, but only with PreparedStatement caching on.
When it is turned off (PSes are closed immediately), we do see the new records and generate new value id=4.

Can you have a look at this?

Our table was created as:
create table tst (id integer not null auto_increment, val integer default null, primary key (id))

Servoy insert sql:
insert into tst (val) values (?)
select currval('tst','id')

Re:Selecting auto_increment current value when using cached prepares statements
HXTT Support
2012-07-09 21:33:54.0
Supported now.

Search Key   Search by Last 50 Questions


Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap