I am not able to change a constraint in SQLite:
1. I created a schema in SQLite witth AutoCAD Map 3D 2012.
2. I set a constraint to one field: a list with 3 entries valid for the property. For example:
3. I draw some lines
In the schema editor I want to change the constraint:
- But I am not able to add a new entry “Test 4” to the list from step 2
- I am also not able to change an existing entries (“test 1” to “test 1 new”)
Is it possible to change the settings of a constraint?
The help (http://docs.autodesk.com/MAP/2012/ENU/filesMUG/GUI
But I do not want to change the “constraint type”. I want to change the entries of the list.
Solved! Go to Solution.
at least the help is right, and also: I do understand your situations (it get's sometimes frustrating having data finalized and then have to add or modify some fields).
What would I do:
- First I would try to close Map3D or at least disconnect from the DB, modify some fields within the SQLite-database itself, then connect again to the DB.
- If that does not help, by what reason ever, you can create a new scheme and then do a masscopy from your previous scheme to the new one.
Good luck, - alfred -
Ingenieur Studio HOLLAUS ... www.hollaus.at
thank you for your answer.
Autodesk has now replied to me directly. Autodesk has also proposed to do an export/import.
Your idea to modify the SQLite-database is good. But unfortunately this does not work:
I've looked at how a “constraint in AutoCAD FDO schema” is implemented in SQLite. SQLite uses a SQL-constraint when a table is created:
CREATE TABLE "testtable” … "testfield" TEXT CONSTRAINT CHK_Typ CHECK("testfield " IN(‘Test 1, Test 1, Test 1)) …
Normaly I would drop the existing constraint, and add the new constraint:
ALTER TABLE ... DROP CONSTRAINT CHK_Typ
ALTER TABLE ... ADD CONSTRAINT CHK_Typ ...
The problem is that SQLite does not support a CONSTRAINT option in the ALTER command (http://www.sqlite.org/omitted.html).
In my opinion this is very great limitation of a geodatabase based on SQLite.
Thanks for your help.
I agree with Alfred - the new schema (possibly from an export/import of just the schema), then a bulkcopy is likely the easiest route, considering the SQLite limitations.
Nate Moore, GISP
Geospatial Premium Support Specialist