[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] return value of autonumber or code at time of INSERT


Quoting maillists (suppressed):
> 
> This is in my catalog.cfg: ##########
> ###################################################
> Database tablename AUTO_SEQUENCE code_seq <<-- I'm not sure what this
> does?
> 
> This is part of my tablename.mysql and i rebuilt the database with
> Interchange restart. ############
> ###################################################
> Database  tablename  tablename.txt __SQLDSN__
> Database  tablename  AUTO_NUMBER  00101

Those two are incompatible. If you are using AUTO_NUMBER, it is not
the same as AUTO_SEQUENCE.

AUTO_NUMBER uses an Interchange file counter to assign the ids. This
doesn't work with the form-based insert.

AUTO_SEQUENCE uses MySQL auto_increment to do the same (or Postgres
sequences if that is used). It should work with the form.

> Database  tablename  KEY          code
> Database  tablename  COLUMN_DEF   "code=INT(20) NOT NULL PRIMARY KEY"

If your table was built with this definition, you are not using
auto_increment.

You can rebuild your table using this:

    Database tablename AUTO_SEQUENCE code_seq

That will replace the two lines:

    Database  tablename  AUTO_NUMBER  00101
    Database  tablename  COLUMN_DEF   "code=INT(20) NOT NULL PRIMARY KEY"

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <suppressed>

Unix version of an Outlook-style virus:
It works on the honor system. Please forward this message to everyone
you know, and delete a bunch of your files at random.
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.