[Gambas-user] Database Edit error with SQlite

ron ronstk at ...239...
Thu Sep 2 21:16:19 CEST 2004


On Thursday 02 September 2004 20:20, Benoit Minisini wrote:
> On Thursday 02 September 2004 09:02, ron wrote:
> > On Wednesday 01 September 2004 21:22, Benoit Minisini wrote:
> > > On Wednesday 01 September 2004 05:02, Jeff Johnson wrote:
> > > > Were you ever able to figure out anything on the sqlite edit/update?
> > >
> > > Yes: you must define a primary key in your table.
> >
> > Is this a requirement for gambas or for sqllite
> 
> This is a requirement for the Connection.Edit() method.
> 
So for all db types? lite mysql and postgre.

This is for mysql wrong. you can have table without key.
Or it must be changed in version 4.x against 3.x

I had working table without any key working as far I know. 
It's a pitty I can't verify it atm. the HD with the tables 
is on vacation by my brother.
 
Ok I create table with phpmyadmin
2 records no key's and be able to update the record
the sql shown is
UPDATE `tab2` 
  SET `active` = '1' 
  WHERE `id` = '0' 
    AND `name` = 'first' 
    AND `birth` = '2004-09-02 21:09:49' 
    AND `active` = '0' 
    AND CONCAT( `salary` ) = '0' 
  LIMIT 1 ;

what to do in my company if the table has 10.000.000 records
(the spam email db) :-) 




More information about the User mailing list