[Gambas-user] Database Manager Bug (no not the same one)
Benoit Minisini
gambas at ...1...
Wed Aug 16 22:22:23 CEST 2006
On Wednesday 16 August 2006 23:04, sbungay wrote:
> Yes I did. Why would it change the autoincrement key field to
> non-autoincrement when the key field was not modified? It is a behaviour
> I did not expect.
>
> Steve.
>
Because autoincrement key field is not standard in SQL. So I had to choose a
specific kind of field to represent autoincrement key fields, for each
database driver.
For example, in the mysql driver, a autoincrement key field is created as
'BIGINT UNSIGNED NOT NULL AUTO_INCREMENT', and detected if the definition
returned by mysql is 'BIGINT' and includes the 'AUTO_INCREMENT' keyword
somewhere. Otherwise your field is not considered as an autoincrement key.
You must understand that the database manager works in a database-agnostic
way, and so must use many tricks like that. The fault is SQL, that is the
ugliest standard I have ever seen. I don't think we should even call that
thing a standard.
Regards,
--
Benoit Minisini
More information about the User
mailing list