Date index for Aug 2002
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [achievo] Stuck in "Insert Jail"
OK, I now understand how to make it work.
However, a couple of points for the sake of discussion:
1) Don't we have a basic mixture of concepts where the usual idea of an
AUTO_INCREMENT (or IDENTITY) field is maintained automatically by the
RDBMS system and not artificially controlled as in the current Achievo
mechanisms?
2) Does the size of the varchar field in db_sequence pose any possible
problem in cases like mine where I happen to take the route using very
LONG table names? (i.e. my Technlogy_SubClasses exceeded the field
length).
Thanks again.
Dave
> Hi,
>
> Dave Nuttall wrote:
>
> > When I input 3 and 'test', I think it should produce:
> > VALUES (0,3,'test')
> > but instead, as per the error above, it shows:
> > VALUES ('1','3','test')
>
> That is correct. Sequences in Achievo start at 1.
>
> However, if you manually inserted records into the table, than
Achievo
> can no longer insert those records, because its sequence is out of
date.
>
> Achievo does not use MySQL's auto_increment feature (for
compatibility
> with other databases). Instead, is has a table called db_sequence,
that
> contains the sequence id's.
>
> So if you added one record with Achievo, and then added 3 records
> manually, id's 2, 3 and 4 are 'taken'. So the next 3 inserts by
Achievo
> will fail. The fourth insert, which gets number 5, should then go
alright.
>
> Greetings,
> Ivo
>
> --
> Ivo Jansch <ivo dot
> ibuildings.nl BV - information technology
> http://www.ibuildings.nl
>
>
>
> [ Achievo mailing list - http://www.achievo.org/ ]
> [ to unsubscribe send an e-mail to achievo-unsubscribe dot
>
>