Using PostGIS connection in Geomedia Object

Jan 18, 2013 at 10:27 PM

Hi, I'm experiencing a problem when using Connection object in Geomedia Object, without an Application instance. When I call OpenRecordset on GDatabase object I receive a not yet implemented exception. The same thing when I ask for the output recordset on the originating pipe. How can I overcome this problem?

Of course I don't have this problem with different kind of connection.


Jan 25, 2013 at 10:53 AM

Please provide some more info about your system and programming language/tool used. Noone has ever reported something like that, so it is not a general problem. For example the following VB code snippet works normally:

Option Explicit

Private Sub Command1_Click()
  Dim objConn As New Connection
  Dim objRS As GRecordset
  Dim objDB As GDatabase

  With objConn
    .Type = "PostGIS.GDatabase"
    .Location = "deb-psg"
    .ConnectInfo = "gdouser/gdouser@ussampledata"
  End With

  If objConn.Status = 1 Then
    Set objDB = objConn.Database
    Set objRS = objDB.OpenRecordset("states")
    MsgBox objRS.RecordCount
    Set objRS = Nothing
    Set objDB = Nothing

  End If

  Set objConn = Nothing
End Sub

Thanks, Pavel

Jan 25, 2013 at 1:28 PM

I have a .Net C# application embedding Geomedia Objects (MapView, LegendView), whithout an Application object running

Jan 25, 2013 at 6:31 PM

I tested the same code with C#, VS 2010, and it works OK. Can you provide a test application? Pavel

Jan 26, 2013 at 4:39 AM
Edited Jan 26, 2013 at 4:41 AM

Are you running it from a Geomedia Command? I'm not developing a Geomedia custom command. I have a Windows Form application hosting Geomedia controls. I will post the solution as soon as I can

Jan 26, 2013 at 6:51 PM

I am also running a stand alone application. I'll wait for your code. Pavel