<div dir="ltr">Thanks for your reply.<div><br></div><div>MapWinGIS is indeed a Windows-only project written in C++.</div><div>My test application is written in C#, so I can use npsql to connect to PostGIS and send the 'Create database' statement.</div><div><br></div><div>But I'm mostly wondering why I can do everything with the PostGIS driver, except create or drop a database.</div><div>Perhaps the driver needs a ExecuteNonQuery() function, like npsql does?</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><br>
<br>
Paul<br>
<br>
<div style="font-size:13.3px;font-family:Verdana,Arial,Helvetica,sans-serif"><div style="border:1px solid #e5e5e5;background-color:#f8f8f8;padding:0.8em 0.8em 0.3em 0.8em"><div style="margin:0 0 8px 0"><p style="margin:0"><span><b><img style="float:left;margin-left:5px;margin-right:5px" src="http://www.bontepaarden.nl/bontepaarden/images/newButton.png" alt="" height="120" width="160">Paul Meems </b><br><span>Release manager, configuration manager</span><br><span>and forum moderator of MapWindow GIS.</span><br><a href="http://www.mapwindow.org/" target="_blank"><span>www.mapwindow.org</span></a><br><br><span>Owner of MapWindow.nl - Support for</span><br><span>Dutch speaking users.</span><br><a href="http://www.mapwindow.nl/" target="_blank"><span>www.mapwindow.nl</span></a><br></span></p>
<p style="margin:0px"><b><br></b></p><p style="margin:0px"><b><a href="http://www.slideshare.net/mapwindow" target="_blank">The English presentations of the MapWindow GIS Conference 2014 are online.</a><br></b></p></div></div><img src="http://p1.wisestamp.com/pixel.png?p=mozilla&v=3.9.12&t=1322134056890&u=482737fd0c4ca423" height="1" width="1"></div>
</div></div>
<br><div class="gmail_quote">2014-10-23 22:48 GMT+02:00 M. Edward (Ed) Borasky <span dir="ltr"><<a href="mailto:znmeb@znmeb.net" target="_blank">znmeb@znmeb.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If this is a Windows-only project, you can write directly to PostgreSQL / PostGIS using the ODBC driver. And if you have shapefiles, there's a PostGIS utility called "shp2pgsql" that will import them.<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Oct 23, 2014 at 1:03 PM, Paul Meems <span dir="ltr"><<a href="mailto:bontepaarden@gmail.com" target="_blank">bontepaarden@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div><br></div><div>At this moment we are working on getting PostGIS support for MapWinGIS.</div><div>We use the PostGIS driver from GDALv2.</div><div><br></div><div>So far we can read and write layers.</div><div>We also want to implement some tests, which are also used as a show case for other users.</div><div><br></div><div>For these tests I want to create a database, import some layers, doe something with the layers and drop the database again.</div><div><br></div><div>Creating and dropping a database using ExecuteSQL() doesn't work as stated at the driver page:</div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">The PostgreSQL driver does not support creation of new datasets (a database within PostgreSQL), but it does allow creation of new layers within an existing database.</span><br></div><div>The error I'm getting is "CREATE DATABASE cannot run inside a transaction block".</div><div><br></div><div>Does anybody have an idea how to solve this? I don't want to manually create the database. The tests are more or less running automated. I would also like to prevent to bypass GDAL/OGR and connect to PostGIS directly to create and drop a database.<br clear="all"><div><div dir="ltr"><br></div><div>Any suggestions are much appreciated.</div><div dir="ltr"><br></div><div dir="ltr">Thanks,<br>
<br>
Paul<br>
<br>
<div style="font-size:13.3px;font-family:Verdana,Arial,Helvetica,sans-serif"><div style="border:1px solid rgb(229,229,229);padding:0.8em 0.8em 0.3em;background-color:rgb(248,248,248)"><div style="margin:0px 0px 8px"><p style="margin:0px"><span><b><img style="float:left;margin-left:5px;margin-right:5px" src="http://www.bontepaarden.nl/bontepaarden/images/newButton.png" alt="" height="120" width="160">Paul Meems </b><br><span>Release manager, configuration manager</span><br><span>and forum moderator of MapWindow GIS.</span><br><a href="http://www.mapwindow.org/" target="_blank"><span>www.mapwindow.org</span></a><br><br><span>Owner of MapWindow.nl - Support for</span><br><span>Dutch speaking users.</span><br><a href="http://www.mapwindow.nl/" target="_blank"><span>www.mapwindow.nl</span></a><br></span></p>
<p style="margin:0px"><b><br></b></p><p style="margin:0px"><b><a href="http://www.slideshare.net/mapwindow" target="_blank">The English presentations of the MapWindow GIS Conference 2014 are online.</a><br></b></p></div></div><img src="http://p1.wisestamp.com/pixel.png?p=mozilla&v=3.9.12&t=1322134056890&u=482737fd0c4ca423" height="1" width="1"></div>
</div></div>
</div></div>
<br></div></div>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br>Twitter: <a href="http://twitter.com/znmeb" target="_blank">http://twitter.com/znmeb</a>; Computational Journalism on a Stick <a href="http://j.mp/CompJournoStickOverview" target="_blank">http://j.mp/CompJournoStickOverview</a><br><br>Remember, if you're traveling to Bactria, Hump Day is Tuesday and Thursday.
</font></span></div>
</blockquote></div><br></div>