<pre>Paul & Regina,<br><br>Paul: I noticed there is no -f option. Would I be able to run a command direct to psql (with the | ) without having to open the command prompt first? <br><br>Regina: I tried that, good idea though.<br>
<br>More diagnosing: I am able to run pgsql from my program without an issue. I tried to run shp2pgsql.exe from a .bat file I wrote and it also has the same error. Anyone else have any ideas?<br><br>Thanks<br>Dan<br><br>
QUOTED:<br>------------------------------<br><br>Message: 4<br>Date: Sun, 1 Jun 2008 06:39:09 -0400<br>From: "Paragon Corporation" <<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>><br>Subject: RE: [postgis-users] Can't Call shp2pgsql.exe From "Run" or VB<br>
Program, only works with DOS prompt opened first<br>To: "'PostGIS Users Discussion'"<br> <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Message-ID: <000501c8c3d3$b936ef00$4d812e40@l><br>
Content-Type: text/plain; charset="us-ascii"<br><br>Dan,<br><br>Could also be the VB code or run statement is being truncated. How are you<br>escaping out your double quotes in VB.<br><br>E.g. if you copy the files to root of C and then try it does it work?<br>
<br>Hope that helps,<br>Regina<br><br> <br><br>-----Original Message-----<br>From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a><br>[mailto:<a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a>] On Behalf Of Paul<br>
Ramsey<br>Sent: Saturday, May 31, 2008 6:05 PM<br>To: PostGIS Users Discussion<br>Subject: Re: [postgis-users] Can't Call shp2pgsql.exe From "Run" or VB<br>Program,only works with DOS prompt opened first<br>
<br>The redirect may not work when running it from Run... or exec inside a<br>program. This sort of argues for a -f option to write out to file without<br>needing a stdout redirect.<br><br>P<br><br>On Sat, May 31, 2008 at 2:49 PM, Daniel Blomberg <<a href="mailto:services@gpsfiledepot.com">services@gpsfiledepot.com</a>><br>
wrote:<br></pre>
<blockquote type="cite"><pre>Hi,<br><br>I am trying to run shp2pgsql.exe from inside a visual basic program I <br>am writing. Its not working so i tested the command I am sending from <br>the "Run" dialog box in windows and it doesn't work. The dos box pops <br>
up and goes away too fast but here is what I caught:<br><a href="http://www.gpsfiledepot.com/shp2pgsql.jpg">http://www.gpsfiledepot.com/shp2pgsql.jpg</a><br><br>The command I am trying to run is:<br>"C:\gps_maps\postgis_sql\shp2pgsql.exe"<br>
"C:\gps_maps\mississippi_topo\transportation\all_lines.shp" all_lines <br></pre><blockquote type="cite"><pre>"C:\gps_maps\mississippi_topo\transportation\all_lines.sql"<br></pre></blockquote><pre>If I run the command when the dos prompt is open it works. Ideas/help <br>
would be much appreciated.<br><br>Thanks in advance<br>Dan<br><br><br>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br><br></pre></blockquote>