Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » GetInsertedId does not work for all data types.
GetInsertedId does not work for all data types. [message #52530] Fri, 18 October 2019 13:34 Go to next message
Alboni is currently offline  Alboni
Messages: 203
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
The Sql::GetInsertId() call always gives an integer value of 0 if the key is a Date.

[Updated on: Fri, 18 October 2019 13:41]

Report message to a moderator

Re: GetInsertedId does not work for all data types. [message #52531 is a reply to message #52530] Sun, 20 October 2019 10:25 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13045
Registered: November 2005
Ultimate Member
Alboni wrote on Fri, 18 October 2019 13:34
The Sql::GetInsertId() call always gives an integer value of 0 if the key is a Date.


Uhm, I did not even knew that you can have Date primary key with autoincrement... What DB is that?

Mirek
Re: GetInsertedId does not work for all data types. [message #52532 is a reply to message #52531] Sun, 20 October 2019 12:54 Go to previous message
Alboni is currently offline  Alboni
Messages: 203
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
I am using MySql. No there is no autoincrement on the key. I used GetInsertedId() in many cases to check if the Insert succeeded.
I am also seeing the relevant MySql function seems to be integer only.
Previous Topic: can I use 127.0.0.1 as host in open function?
Next Topic: undefined symbol when linking pgexec mingw
Goto Forum:
  


Current Time: Fri Jan 22 03:59:01 CET 2021

Total time taken to generate the page: 0.00899 seconds