HI,
I am encountering an error when trying to create a row in an enterprise table.
"An exception of type 'ArcGIS.Core.Data.GeodatabaseException' occurred in mscorlib.dll but was not handled in user code"
On Click of View Detail it gives me "A geodatabase exception has occurred.``
I am not sure what I am doing wrong here:
Below is the code I used for creating a row in enterpriseDatabase.
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => {
using (Geodatabase geodatabase = new Geodatabase(new DatabaseConnectionFile(new Uri("C:\\Users\\NNagandla\\Documents\\ArcGIS\\Projects\\BRIDGE_DATA_STRUCTURE_FINAL\\Mi_BIS_Dev_12c.sde"))))
{
// Use the geodatabase.
var isTblExists = TableExists(geodatabase, "BRIDGES_DATA.STRUCTURE_NEW");
if (isTblExists)
{
using (ArcGIS.Core.Data.Table enterpriseTable = geodatabase.OpenDataset<ArcGIS.Core.Data.Table>("BRIDGES_DATA.STRUCTURE_NEW"))
{
var count = enterpriseTable.GetCount();
using (RowBuffer rowBuffer = enterpriseTable.CreateRowBuffer())
{
// Either the field index or the field name can be used in the indexer.
rowBuffer["ID"] = _intID;
rowBuffer["SITE"] = _txtSiteNumber;
rowBuffer["SEQ"] = _txtSeqNumber;
rowBuffer["LONGITUDE"] = _dblLong;
rowBuffer["LATITUDE"] = _dblLat;
using (Row row = enterpriseTable.CreateRow(rowBuffer))
{
// store the values
row.Store();
}
}
}
}
}
});
It throws error on line Row row = enterpriseTable.CreateRow(rowBuffer)