<HTML><BODY><div><div>Dear Carlos, it is not about mapfile, it is in location cell of tileindex. It is one cell in table (database table, dbf file etc.), and I need to put there both connection and data details. The question is how to make it so that mapserver parses it correctly.</div><div>Sincerely, Zmitser</div><br><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Среда, 24 марта 2021, 6:53 +03:00 от Carlos Ruiz <boolean10001@yahoo.com>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16165579951276773355_BODY"><div class="cl_597328"><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif; font-size:13px" class="ydpe19f82e2yahoo-style-wrap_mr_css_attr"><div>Zmitser,</div><div> </div><div>You have to have the following on a MAP file:</div><div> </div><div>LAYER</div><div> </div><div>...</div><div> </div><div>CONNECTION "host=<HOST> ... password=<PASSWORD>"</div><div>CONNECTIONTYPE <CONNECTION_TYPE></div><div>DATA "<GEOM_COLUMN> FROM <TABLE NAME> USING UNIQUE <ID> USING SRID=<SRID>"</div><div> </div><div>...</div><div> </div><div>END</div><div> </div><div>On DATA you must specify the name of the geometry column and the table, if you're using a database. If you are using a shape file you just have to include the DATA keyword with the path and the name of the SHP file.</div><div> </div><div> </div></div><div id="ydp4a9c06dayahoo_quoted_6860825563_mr_css_attr" class="ydp4a9c06dayahoo_quoted_mr_css_attr"><div style="color:#26282a; font-family:'Helvetica Neue',Helvetica,Arial,sans-serif; font-size:13px"><div>On Tuesday, March 23, 2021, 2:34:48 AM CST, Zmitser Kozhukh via mapserver-users <<a href="/compose?To=mapserver%2dusers@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:</div><div> </div><div> </div><div><div id="ydp4a9c06dayiv6459760804_mr_css_attr"><div><div>Dear mapserver users, I need to specify data parameter at the location item of tileindex.</div><div>So far, I have tried many possibilities but none works:<br>‘host=127.0.0.1 dbname=database user=admin password=admin DATA "geom from table using unique id using srid=4326"’</div><div>or</div><div>host=127.0.0.1 dbname=database user=admin password=admin data="geom from table using unique id using srid=4326"</div><div>etc.</div><div>Still I get an error :</div><div><span style="color:rgb(0, 0, 0);font-family:monospace;font-size:13px;font-style:normal;font-weight:400;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none;">msDrawMap(): Image handling error. Failed to draw layer named 'layer'. msPostGISLayerOpen(): Query error. Nothing specified in DATA statement.</span></div><div><div>Could someone please tell in which format data statement should be?</div></div><div>In documentation it is written vaguely:</div><div><span style="color:rgb(62, 67, 73);font-family:Arial, sans-serif;font-size:12.8px;font-style:normal;font-weight:400;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;background-color:rgb(255, 255, 255);text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none;">Normally the location should contain the path to the tile file relative to the shapepath, not relative to the tileindex itself. If the DATA parameter contains a value then it is added to the end of the location.</span></div><div> </div><div><div><div>--<br>Zmitser Kozhukh</div></div></div></div></div>_______________________________________________<br>mapserver-users mailing list<br><a href="//e.mail.ru/compose/?mailto=mailto%3amapserver%2dusers@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></div></div></div></div></div></div></div></div></blockquote> <div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Zmitser Kozhukh</div></div></div><div> </div></div></BODY></HTML>