Hi I have an external application - in MS Access (32bit). I am creating a new Manifold Document, which works, as follows: Function MfdCreateDocument() As Manifold.Document Dim mfdApp As Manifold.Application Set mfdApp = Manifold.Application Set MfdCreateDocument = mfdApp.NewDocument("c:\surveymanager\manifold\test.map", False) End Function I then try to link some PostgreSQL VIEWS as follows: Sub MfdLinkPGViews(mfdDocument As Manifold.Document) Set ds = mfdDocument.NewDataSource ds.ConnectionType = "PostgreSQL" Server = "Geohub" Port = "5432" UserName = "myusername" Password = "mypassword" Database = "mydatabase" ds.ConnectionString = "host='" + Server + "' port='" + Port + "' user='" + UserName + "' password='" + Password + "' dbname='" + Database + "'" ds.LinkDrawingFromTableGeometry "myPGView", "geom", ColumnTypeGeomWKB End Sub This fails on ds.ConnectionType = "PostgreSQL". I've tried other connection types, which are recognised, just fails on "PostgreSQL". An essentially identical script in vbscript run from Manifold directly works fine. To be clear, the above is run from inside MS Access. It seems MS Access can't see PostgreSQL or psqlODBC. I have the path to PostgreSQL in my PATH variable. Can anyone point me in the direction of tracing this fault. Thanks Oisin
|