[Gambas-user] Bug in Tableview

Eric Damron edamron at ...776...
Mon Feb 14 18:58:59 CET 2005


nigel at ...38... wrote:

> I also do not believe that you can have a default value for an auto 
> increment...well in the version of mysql that I have, the command is 
> invalid unless you remove the DEFAULT 0 syntax.
>
>  
>
> Nigel
>
>
>
>
>     > Message date : Feb 14 2005, 01:38 PM
>     > From : "Benoit Minisini"
>     > To : gambas-user at lists.sourceforge.net
>     > Copy to :
>     > Subject : Re: [Gambas-user] Bug in Tableview
>     > 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...
>     >
>     >
>     > -------------------------------------------------------
>     > SF email is sponsored by - The IT Product Guide
>     > Read honest & candid reviews on hundreds of IT Products from
>     real users.
>     > Discover which products truly live up to the hype. Start reading
>     now.
>     > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
>     > _______________________________________________
>     > Gambas-user mailing list
>     > Gambas-user at lists.sourceforge.net
>     > https://lists.sourceforge.net/lists/listinfo/gambas-user
>     > 
>
>
>
> Whatever you Wanadoo <http://www.wanadoo.co.uk/time/>
>
> This email has been checked for most known viruses - find out more 
> here <http://www.wanadoo.co.uk/help/id/7098.htm>

Thanks Nigel, I have removed that from the SQL.  My version doesn't have 
a problem with it.  In fact I used the MySQL-Administrator to set up one 
of the tables and just copied the SQL that it used.  Never thought that 
different versions of MySQL wouldn't like it.




More information about the User mailing list