I am looking for a opensource tool to display spatial data. I found MapWinGis. There a lot of examples how to open a shape, but what i want is top open a Oracle table and display it.
This is what i have (and does not work and the LastErrorCode doesn't say anything):
private void button1_Click(object sender, EventArgs e)
{
string connectionString = "host=ubuntu:1521/test dbname=MYTESTDATABASE user=TEST_USRER password=TEST_USER";
var layer = new OgrLayer();
if (layer.OpenFromDatabase(connectionString, "OEFEN_TABEL_GEOM"))
{
// only layer handle for the first layer being added is returned
int layerHandle = axMap1.AddLayer(layer, true);
}
else
{
MessageBox.Show("Failed to open: " + layer.get_ErrorMsg(layer.LastErrorCode));
}
}