Subscribe to this thread
Home - General / All posts - Big problem with ID and auto increment column in dRawing
lionel

562 post(s)
#20-May-18 12:47

i can't edit this old post about old manifold version Big problem with ID and auto increment column in drawing.

Does manifold 9 has some functionnalities to manage new colum that must behave like auto increment .

i think index in MFD9 also support i think many hidden options that the shema GUI Panel windows don't show or let us modify like : auto_increment , unique ,sequence, not null , positive , numeric data ( not float?) primary key, trigger ( spy insert event to compute add a value to the field) ?

perhaps some property fields should be use to make auto increment work ?

I read that in MYSQL some that the specific SQL engine MyISAM support auto increment in secondary column !

an article cover auto increment in SQL SERVER and MS ACCESS and other howto reset increment column

each SQL Servers use it own reserved word in SQL to implement auto increment !

in the doc the increment word is relative to

1) Manifold will increment the name

2) Manifold will automatically populate the mfd_idprimary key ID field by auto-incrementing it starting from 1as we add records to a new table.

But no article about SQL "AUTO INCREMENT" or any other specific way to create / update re initiate a increment column ( index or new column )

IT is strange in a mysql article , reset the auto increment need to use truncate or drop / create so we lost our data !!! what is the purpose of this way of doing ?

Perhaps there is there is no reason to change or manipulate an index column unless you want to order things. So icreate a new post about orders things

regard's

Attachments:
manifold9_increment.png


join image

"Because my dad promised me" ( interstellar ) but blackhole don't exist

best hardware with no ads focus on quality features price like manifold see xiaomi

adamw


8,567 post(s)
#22-May-18 09:26

Support for autoincrement (or otherwise autofilling) fields depends on the data source.

The only autoincrement field in MAP files is MFD_ID.

We might allow custom autoincrement fields in MAP files in the future. We are also looking to allow working with autoincrement fields on other data sources in database-neutral manner from SQL.

lionel

562 post(s)
#28-Nov-18 21:49

Hi

1) does it mean if we alter table by adding an mfd_id column name that manifold engine ll add to it some properties like make this column autoincrement ?

I test with mfd_id ( type int64 ) in lowercase and don't work !!

if mfd_id is use during CREATE statement , mdf_id is increment !!

2)

Support for autoincrement (or otherwise autofilling) fields depends on the data source.

which kind of datasource ? which context ?

regard's


join image

"Because my dad promised me" ( interstellar ) but blackhole don't exist

best hardware with no ads focus on quality features price like manifold see xiaomi

adamw


8,567 post(s)
#12-Dec-18 10:18

1 - If you add a field named mfd_id (case does not matter) to a table in a MAP file, then it should autoincrement. In that you will be able to add records without specifying the value for that field and the table will automatically use a unique value. That applies only to tables in MAP files, tables on other data sources might behave differently.

2 - Many databases support autoincrementing / autofilling fields. How you create them and what you can do with them depends on the database. Here's how to create an autoincrementing field on SQL Server, for example:

--SQL

CREATE TABLE t8 (id INT IDENTITY, v INT);

INSERT INTO t8 (v) VALUES (5); -- id gets autofilled

Hope this helps.

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.