<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello Bernhard,<br>
<br>
Thanks for the suggestion. I just installed the plugin. When
selecting a table and trying to initialise the layer I get a
Database Error: syntax error at or near "("<br>
LINE1: EXECUTE ('public'.'T_network_geometry') (followed by more,
I can send the screenshot). <br>
<br>
When I click OK the python error window shows:<br>
<br>
<span style=" font-family:'Courier New,courier';">Traceback (most
recent call last):<br>
File
"C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\datadriveninputmask.py",
line 188, in initializeLayer<br>
inputUi = None, searchUi = None, helpText = "") # set the
defaults here because somehow some of the values persist<br>
File
"C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddmanager.py",
line 176, in initLayer<br>
readConfigTables = readConfigTables)<br>
File
"C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py",
line 371, in createUi<br>
showParents, showChildren, readConfigTables,
createAction)<br>
File
"C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py",
line 200, in __createForms<br>
n2mAttributes = self.getN2mAttributes(db, thisTable,
anAtt.name, anAtt.num, labels, showChildren, skip)<br>
File
"C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py",
line 635, in getN2mAttributes<br>
configList = self.configureLayer(ddRelationTable, [],
{}, [], {}, {}, [], db, True, "")<br>
File
"C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\ddui.py",
line 184, in configureLayer<br>
DbError(query)<br>
File
"C:/Users/Janneke/.qgis2/python/plugins\DataDrivenInputMask\dderror.py",
line 54, in __init__<br>
raise FatalError("DBError exiting")<br>
FatalError: 'DBError exiting'<br>
</span>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
Python version:<br>
2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit
(Intel)]<br>
<br>
QGIS version:<br>
2.6.1-Brighton Brighton, e2a51df</p>
<br>
Should I do something else before initialising the layer?<br>
<br>
thanks,<br>
Janneke<br>
<br>
<br>
On 22/12/2014 10:14, Bernhard Ströbl wrote:<br>
</div>
<blockquote cite="mid:5497C4CC.7080407@jena.de" type="cite">Hi
Janneke,
<br>
<br>
this is not answering your question... but, have you tried the
DataDrivenInputMask plugin [1]. It auto-generates input masks for
PostgreSQL layers. Only prerequisite is a properly designed
database in respect to constraints, default values, data types.
<br>
<br>
regards
<br>
<br>
Bernhard
<br>
<br>
[1] <a class="moz-txt-link-freetext" href="http://plugins.qgis.org/plugins/DataDrivenInputMask/">http://plugins.qgis.org/plugins/DataDrivenInputMask/</a>
<br>
<br>
Am 21.12.2014 15:44, schrieb Janneke van Dijk:
<br>
<blockquote type="cite">Dear all,
<br>
<br>
I have set up a form in QGIS 2.6 using the attribute editor
layout
<br>
'autogenerate', to edit an editable view in a postgres database.
This
<br>
works nicely. I would like to use this form to edit data in
other
<br>
databases that have an identical structure. Ideally, I would set
up a
<br>
project file with all properties set where I could choose to
load layers
<br>
either from one or another database (with identical structures),
and
<br>
when I edit a layer the correct form opens.
<br>
<br>
If I save it as a .qml file (from project1 connected to
database1), then
<br>
load it in project2 (connected to database2 with identical
tables
<br>
loaded) through properties>fields>load style it appears to
load it (the
<br>
edit widgets get changed to the same as in project1), but when I
click a
<br>
value relation widget the layer, key column and value column
fields are
<br>
empty. When I open the attribute table all fields that have a
value
<br>
relation that refers to a lookup table that contains different
values
<br>
than the original lookup table will show their values between
brackets
<br>
(at least, those values that do not appear in the original
table).
<br>
<br>
It looks as if the .qml retains a link to the original database
and
<br>
lookup tables (and not just to layer names as they are loaded in
the
<br>
project). Is there a way to configure a form based on a table
structure
<br>
that can be re-used for other tables with the same structure?
<br>
<br>
Thanks,
<br>
<br>
Janneke
<br>
<br>
<br>
_______________________________________________
<br>
Qgis-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
<br>
<br>
<br>
__________ Information from ESET Mail Security, version of virus
signature database 10911 (20141221) __________
<br>
<br>
The message was checked by ESET Mail Security.
<br>
<a class="moz-txt-link-freetext" href="http://www.eset.com">http://www.eset.com</a>
<br>
<br>
</blockquote>
<br>
<br>
<br>
__________ Information from ESET Mail Security, version of virus
signature database 10912 (20141221) __________
<br>
<br>
The message was checked by ESET Mail Security.
<br>
<a class="moz-txt-link-freetext" href="http://www.eset.com">http://www.eset.com</a>
<br>
<br>
<br>
_______________________________________________
<br>
Qgis-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
<br>
<br>
</blockquote>
<br>
</body>
</html>