[postgis-users] RE: Can't Call shp2pgsql.exe From "Run" or VB Program, only works with DOS prompt opened first

Daniel Blomberg services at gpsfiledepot.com
Sun Jun 1 12:57:30 PDT 2008

Paul & Regina,

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?

Regina: I tried that, good idea though.

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?



Message: 4
Date: Sun, 1 Jun 2008 06:39:09 -0400
From: "Paragon Corporation" <lr at pcorp.us>
Subject: RE: [postgis-users] Can't Call shp2pgsql.exe From "Run" or VB
	Program,	only works with DOS prompt opened first
To: "'PostGIS Users Discussion'"
	<postgis-users at postgis.refractions.net>
Message-ID: <000501c8c3d3$b936ef00$4d812e40 at l>
Content-Type: text/plain;	charset="us-ascii"


Could also be the VB code or  run statement is being truncated.  How are you
escaping out your double quotes in VB.

E.g. if you copy the files to root of C and then try it does it work?

Hope that helps,

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paul
Sent: Saturday, May 31, 2008 6:05 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Can't Call shp2pgsql.exe From "Run" or VB
Program,only works with DOS prompt opened first

The redirect may not work when running it from Run... or exec inside a
program. This sort of argues for a -f option to write out to file without
needing a stdout redirect.


On Sat, May 31, 2008 at 2:49 PM, Daniel Blomberg <services at gpsfiledepot.com>


I am trying to run shp2pgsql.exe from inside a visual basic program I
am writing.  Its not working so i tested the command I am sending from
the "Run" dialog box in windows and it doesn't work.  The dos box pops
up and goes away too fast but here is what I caught:

The command I am trying to run is:
"C:\gps_maps\mississippi_topo\transportation\all_lines.shp" all_lines


If I run the command when the dos prompt is open it works. Ideas/help
would be much appreciated.

Thanks in advance

postgis-users mailing list
postgis-users at postgis.refractions.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080601/55626647/attachment.html>

More information about the postgis-users mailing list