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
Today's Messages (on)  | Unanswered Messages (off)

Forum: U++ SQL
 Topic: GetInsertedId does not work for all data types.
Re: GetInsertedId does not work for all data types. [message #52531 is a reply to message #52530] Sun, 20 October 2019 10:25
mirek is currently offline  mirek
Messages: 12051
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
Alboni is currently offline  Alboni
Messages: 182
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.



Current Time: Sun Oct 20 18:37:37 CEST 2019

Total time taken to generate the page: 0.00822 seconds