[Gambas-user] Bug in Tableview

Benoit Minisini gambas at ...1...
Mon Feb 14 14:38:36 CET 2005


On Friday 11 February 2005 04:39, Eric Damron wrote:
> I think there's a bug in the tableview component.  I've included a
> helpdesk project that I've just started.  To run the project you need a
> MySQL server.
>
> 1. Run the project.  It will bring up a logon form.
> 2. Enter a username/passoword that has rights to create databases.   It
> will detect that the helpdesk database does not exist and ask you if you
> want to create it.
> 3. Answer by clicking on the "Yes" button.
> 4. The program will create a database called helpdesk and twelve tables
> before opening the main form. (Note: I have my screen set to 1162 X 864
> resolution so the main form will appear too large if you run at a lesser
> resolution.)

The following request failed when creating the database: 

SUB CreateCALL()
...
 strSQL = "ALTER TABLE `HelpDesk`.`CALL` MODIFY COLUMN `id` INTEGER  NOT NULL 
DEFAULT 0 AUTO_INCREMENT;"
  ' << Query failed: invalid default value for 'id' >>
  ' when executing the previous request
  hConnection.Exec(strSQL)
END

Which version of MySQL do you use ?

Note that there are mistakes in your use of Table.Fields.Create(). The second 
argument is the GAMBAS datatype of the field, not the database datatype. I 
mean, it must be gb.Integer, gb.Float, gb.Date, gb.String or gb.Boolean, 
period. And the third argument is only used with gb.String.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list