﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Manifold Community Site: Question regarding VBscript, Manifold, and connecting to PostgreSQL</title><link>http://forum.manifold.net/forum/t63860</link><description>Manifold Community Site thread</description><image><url>http://forum.manifold.net/forum/images/img-feedhead.png</url><title>Manifold Community Site: Question regarding VBscript, Manifold, and connecting to PostgreSQL</title><link>http://forum.manifold.net/forum/t63860</link></image><item><title>RE: Question regarding VBscript, Manifold, and connecting to PostgreSQL</title><link>http://forum.manifold.net/forum/t63860#63861</link><description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i'm hoping somebody can lend me some advice on this. i'm trying to use a VBscript to create a new Manifold document, import some data into it from PostgreSQL, which i will export to a specified directory (*needs to be in .mif format, otherwise i would just use psql2shp batch program), then close the document. i will schedule this script to run so it updates the directory everynight. here is my question...when approaching manifold through scripting outside of an active manifold session, why can't i establish a connection to the PostgreSQL database? i can import a shp file from my system into the created document, then save it, but i cannot do the same from PostgreSQL. here is some example code so you can see what i'm trying to accomplish.&lt;/P&gt;&lt;P class='code'&gt;&lt;span class=c&gt;'VBscript&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;&lt;span class=k&gt;set&lt;/span&gt;&amp;#160;Application&amp;#160;=&amp;#160;createobject(&lt;span class=s&gt;&amp;quot;Manifold.Application&amp;quot;&lt;/span&gt;)&lt;/P&gt;&lt;P class='code'&gt;&lt;span class=k&gt;set&lt;/span&gt;&amp;#160;Newdoc&amp;#160;=&amp;#160;Application.NewDocument(&lt;span class=s&gt;&amp;quot;&amp;quot;&lt;/span&gt;,&amp;#160;&lt;span class=k&gt;False&lt;/span&gt;)&lt;/P&gt;&lt;P class='code'&gt;&amp;#160;&lt;/P&gt;&lt;P class='code'&gt;&lt;span class=k&gt;set&lt;/span&gt;&amp;#160;shpImporter&amp;#160;=&amp;#160;Newdoc.NewImport(&lt;span class=s&gt;&amp;quot;SHP&amp;quot;&lt;/span&gt;)&lt;/P&gt;&lt;P class='code'&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;shpImporter.import&amp;#160;&lt;span class=s&gt;&amp;quot;C:\SomeFile.shp&amp;quot;&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;Newdoc.saveas&amp;#160;&lt;span class=s&gt;&amp;quot;C:\NewDocument.map&amp;quot;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this first simple piece of code works flawlessly, here is an example when trying to accomplish the same thing but from PostgreSQL....&lt;/P&gt;&lt;P class='code'&gt;&lt;span class=c&gt;'VBscript&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;&lt;span class=k&gt;set&lt;/span&gt;&amp;#160;Application&amp;#160;=&amp;#160;createobject(&lt;span class=s&gt;&amp;quot;Manifold.Application&amp;quot;&lt;/span&gt;)&lt;/P&gt;&lt;P class='code'&gt;&lt;span class=k&gt;set&lt;/span&gt;&amp;#160;Newdoc&amp;#160;=&amp;#160;Application.NewDocument(&lt;span class=s&gt;&amp;quot;&amp;quot;&lt;/span&gt;,&amp;#160;&lt;span class=k&gt;False&lt;/span&gt;)&lt;/P&gt;&lt;P class='code'&gt;&lt;span class=k&gt;set&lt;/span&gt;&amp;#160;ds&amp;#160;=&amp;#160;Newdoc.NewDatasource()&lt;/P&gt;&lt;P class='code'&gt;ds.connectionType&amp;#160;=&amp;#160;&lt;span class=s&gt;&amp;quot;PostgreSQL&amp;quot;&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;server&amp;#160;=&amp;#160;&lt;span class=s&gt;&amp;quot;localhost&amp;quot;&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;port&amp;#160;=&amp;#160;&lt;span class=s&gt;&amp;quot;5432&amp;quot;&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;username&amp;#160;=&amp;#160;&lt;span class=s&gt;&amp;quot;somename&amp;quot;&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;password&amp;#160;=&amp;#160;&lt;span class=s&gt;&amp;quot;somepsswrd&amp;quot;&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;database&amp;#160;=&amp;#160;&lt;span class=s&gt;&amp;quot;somedbase&amp;quot;&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;ds.ConnectionString&amp;#160;=&amp;#160;&lt;span class=s&gt;&amp;quot;host='&amp;quot;&lt;/span&gt;&amp;#160;+&amp;#160;server&amp;#160;+&amp;#160;&lt;span class=s&gt;&amp;quot;'&amp;#160;port='&amp;quot;&lt;/span&gt;&amp;#160;+&amp;#160;port&amp;#160;+&amp;#160;&lt;span class=s&gt;&amp;quot;'&amp;#160;user='&amp;quot;&lt;/span&gt;&amp;#160;+&amp;#160;username&amp;#160;+&amp;#160;&lt;span class=s&gt;&amp;quot;'&amp;#160;password='&amp;quot;&lt;/span&gt;&amp;#160;+&amp;#160;password&amp;#160;+&amp;#160;&lt;span class=s&gt;&amp;quot;'&amp;#160;dbname='&amp;quot;&lt;/span&gt;&amp;#160;+&amp;#160;database&amp;#160;+&amp;#160;&lt;span class=s&gt;&amp;quot;'&amp;quot;&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;ds.importtable(&lt;span class=s&gt;&amp;quot;FileNameIndex&amp;quot;&lt;/span&gt;)&lt;/P&gt;&lt;P class='code'&gt;&amp;#160;&lt;/P&gt;&lt;P class='code'&gt;Newdoc.saveas&amp;#160;&lt;span class=s&gt;&amp;quot;C:\NewDocument.map&amp;quot;&lt;/span&gt;&lt;/P&gt;&lt;P class='code'&gt;&amp;#160;&lt;/P&gt;&lt;P&gt;this second example of code fails when trying to import from PostgreSQL, however the PostgreSQL import mechanism works great if i run it from the Manifold GUI. &lt;/P&gt;&lt;P&gt;I have also tried this using Python and i run into the same problem, connection to PostgreSQL fails&lt;/P&gt;&lt;P&gt;Note: i have both manifold 64bit and 32bit, both connect fine to postgreSQL from the GUI and i'm running build 8.0.6.0&lt;/P&gt;&lt;P&gt;hoping someone can understand what i'm trying to accomplish and shed some light on how i might be able to make this work&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;t-crow&lt;/P&gt;&lt;P class='code'&gt;&amp;#160;&lt;/P&gt;&lt;P class='code'&gt;&amp;#160;&lt;/P&gt;</description><dc:creator>t-crow</dc:creator><comments>http://forum.manifold.net/forum/t63860#63861</comments><guid>http://forum.manifold.net/forum/t63860#63861</guid><pubDate>Tue, 29 Apr 2008 14:07:42 GMT</pubDate></item><item><title>RE: Question regarding VBscript, Manifold, and connecting to PostgreSQL</title><link>http://forum.manifold.net/forum/t63860#63863</link><description>&lt;P&gt;Copy the PostgreSQL client DLL libraries into c:\windows\system32.&lt;/P&gt;</description><dc:creator>AR_Rick</dc:creator><comments>http://forum.manifold.net/forum/t63860#63863</comments><guid>http://forum.manifold.net/forum/t63860#63863</guid><pubDate>Tue, 29 Apr 2008 14:22:38 GMT</pubDate></item><item><title>RE: Question regarding VBscript, Manifold, and connecting to PostgreSQL</title><link>http://forum.manifold.net/forum/t63860#63864</link><description>&lt;P&gt;Rick,&lt;/P&gt;&lt;P&gt;thanks, this seems to have solved the problem, also seems to have cleared up my error with python also. &lt;IMG SRC='http://forum.manifold.net/forum/images/emo-grin.gif'&gt;&lt;/P&gt;</description><dc:creator>t-crow</dc:creator><comments>http://forum.manifold.net/forum/t63860#63864</comments><guid>http://forum.manifold.net/forum/t63860#63864</guid><pubDate>Tue, 29 Apr 2008 15:03:49 GMT</pubDate></item><item><title>RE: Question regarding VBscript, Manifold, and connecting to PostgreSQL</title><link>http://forum.manifold.net/forum/t63860#70215</link><description>&lt;P&gt;1)seem there is a better way to register dll/ocx  wihtout move the dll to C:\window\system32&lt;/P&gt;&lt;P&gt;is to use &lt;B&gt;regsvr32&lt;/B&gt; with option or use it with contextual menu after install the *.reg file &lt;/P&gt;&lt;P&gt;then when go to the directory where dll is locate you could use the contextual menu&lt;/P&gt;&lt;P&gt;2) this make me think about &lt;B&gt;gacuti&lt;/B&gt;l is look like very similar &lt;/P&gt;&lt;P&gt;http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=713&lt;/P&gt;&lt;P&gt;http://www.nirsoft.net/dot_net_tools/gac_viewer.html&lt;/P&gt;&lt;P&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=718831&amp;amp;SiteID=1&lt;/P&gt;&lt;p class='file'&gt;Attachments:&lt;br&gt;&lt;a href='http://forum.manifold.net/Attachments/47/70215/regsevr0.jpg'&gt;&lt;img src='images/dwn-http.gif' align='absmiddle'&gt;&lt;/a&gt;&lt;a href='ftp://forum.manifold.net/attachments/47/70215/regsevr0.jpg'&gt;&lt;img src='images/dwn-ftp.gif' align='absmiddle'&gt;&lt;/a&gt;&lt;span&gt;regsevr0.jpg&lt;/span&gt;&lt;br&gt;&lt;/p&gt;</description><dc:creator>lionel_</dc:creator><comments>http://forum.manifold.net/forum/t63860#70215</comments><guid>http://forum.manifold.net/forum/t63860#70215</guid><pubDate>Wed, 27 Aug 2008 06:49:46 GMT</pubDate></item><item><title>RE: Question regarding VBscript, Manifold, and connecting to PostgreSQL</title><link>http://forum.manifold.net/forum/t63860#70216</link><description>&lt;P&gt;&lt;A HREF='http://www.vbforums.com/archive/index.php/t-264408.html'&gt;ocx dll &lt;/A&gt;&lt;P&gt;dll .net &lt;/P&gt;&lt;A HREF='http://nishantpant.wordpress.com/2008/08/19/get-rid-of-regsvr32-regasm-gacutil-a-shellextension-for-net-and-com-dlls/'&gt;.Net dll &lt;/A&gt;&lt;/P&gt;</description><dc:creator>lionel_</dc:creator><comments>http://forum.manifold.net/forum/t63860#70216</comments><guid>http://forum.manifold.net/forum/t63860#70216</guid><pubDate>Wed, 27 Aug 2008 07:05:32 GMT</pubDate></item><item><title>RE: Question regarding VBscript, Manifold, and connecting to PostgreSQL</title><link>http://forum.manifold.net/forum/t63860#70516</link><description>&lt;P&gt;The PostgreSQL DLLs aren't COM libraries or .NET assemblies, they're just regular procedural DLLs, so they need to be in the correct search path.&lt;/P&gt;</description><dc:creator>AR_Rick</dc:creator><comments>http://forum.manifold.net/forum/t63860#70516</comments><guid>http://forum.manifold.net/forum/t63860#70516</guid><pubDate>Wed, 03 Sep 2008 07:25:04 GMT</pubDate></item><item><title>RE: Question regarding VBscript, Manifold, and connecting to PostgreSQL</title><link>http://forum.manifold.net/forum/t63860#70583</link><description>&lt;P&gt;yes see discover that don't work after i writing this &lt;IMG SRC='images/emo-blush.gif'&gt;.so was aware of  the problem but can 't know  the reason&lt;IMG SRC='images/emo-blink.gif'&gt; .is there tutorial on the net that explain how many type of dll exist ?  don't have the good/suit words that ll return the best link in search engine . &lt;/P&gt;&lt;P&gt;&amp;quot;&amp;quot;A procedural  object is created by an algorithm that takes a set of parameters that  define the object and produces the object representation from that set.&amp;quot;&amp;quot;&amp;quot;&lt;/P&gt;&lt;P&gt;=&amp;gt; all object is create by function ( initialisation affectation) so difficult to understand ! &lt;/P&gt;&lt;P&gt;know  language oriented and procedural but not dll !! &lt;/P&gt;&lt;P&gt;does it refer to the language/registry prameters ? &lt;/P&gt;</description><dc:creator>lionel_</dc:creator><comments>http://forum.manifold.net/forum/t63860#70583</comments><guid>http://forum.manifold.net/forum/t63860#70583</guid><pubDate>Thu, 04 Sep 2008 07:56:05 GMT</pubDate></item></channel></rss>