529 |
dlg = ChooseDBTableDialog(self, self.application.Session()) |
dlg = ChooseDBTableDialog(self, self.application.Session()) |
530 |
|
|
531 |
if dlg.ShowModal() == wxID_OK: |
if dlg.ShowModal() == wxID_OK: |
532 |
dbconn, dbtable = dlg.GetTable() |
dbconn, dbtable, id_column, geo_column = dlg.GetTable() |
533 |
try: |
try: |
534 |
title = str(dbtable) |
title = str(dbtable) |
535 |
|
|
536 |
# Chose the correct Interface for the database type |
# Chose the correct Interface for the database type |
537 |
store = PostGISShapeStore(dbconn, dbtable) |
store = session.OpenDBShapeStore(dbconn, dbtable, |
538 |
session.AddShapeStore(store) |
id_column = id_column, |
539 |
|
geometry_column = geo_column) |
540 |
layer = Layer(title, store) |
layer = Layer(title, store) |
541 |
except: |
except: |
542 |
# Some error occured while initializing the layer |
# Some error occured while initializing the layer |