[fdo-internals] insert error control properties with KingOracle
mdelsinne
mdelsinne at gmail.com
Wed Nov 30 08:01:31 EST 2011
Hello,
Let me explain, I use the provider KingOracle to write an Oracle database.
The problem is that when inserting data, I get comfortable in my table all
Oracle objects and geometry. But the other fields are empty! ID is empty and
no constraints, other fields are also empty.
// Add a id property
DataPropertyDefinition idProp = new DataPropertyDefinition("ID",
"");
idProp.DataType = DataType.DataType_Int64;
idProp.IsAutoGenerated = true;
idProp.Nullable = true;
aFeatureClass.Properties.Add(idProp);
aFeatureClass.IdentityProperties.Add(idProp);
idProp.Dispose();
// Add a key property
DataPropertyDefinition keyProp = new
DataPropertyDefinition("SDFKEY", "");
keyProp.DataType = DataType.DataType_String;
keyProp.Length = 255;
aFeatureClass.Properties.Add(keyProp);
keyProp.Dispose();
// Add a name property
DataPropertyDefinition nameProp = new
DataPropertyDefinition("NAME", "");
nameProp.DataType = DataType.DataType_String;
nameProp.Length = 255;
aFeatureClass.Properties.Add(nameProp);
nameProp.Dispose();
// Add a url property
DataPropertyDefinition urlProp = new
DataPropertyDefinition("URL", "");
urlProp.DataType = DataType.DataType_String;
urlProp.Length = 255;
aFeatureClass.Properties.Add(urlProp);
urlProp.Dispose();
// Add a geometry property
GeometricPropertyDefinition geomProp = new
GeometricPropertyDefinition("GEOM", "");
geomProp.GeometryTypes =
(int)GeometryType.GeometryType_MultiGeometry;
aFeatureClass.Properties.Add(geomProp);
aFeatureClass.GeometryProperty = geomProp;
geomProp.Dispose();
*StringValue key = new StringValue("aKey");
StringValue urlValue = new StringValue("aURL");
StringValue nameValue = new StringValue("aName");*
/// getGeom -> return geometry (FgfGeometryFactory)/
*GeometryValue geomValue = new GeometryValue(getGeom(sdf2Obj));*
cmdInsert.PropertyValues.Add(new PropertyValue("SDFKEY", key));
key.Dispose();
cmdInsert.PropertyValues.Add(new PropertyValue("NAME", nameValue));
nameValue.Dispose();
cmdInsert.PropertyValues.Add(new PropertyValue("URL", urlValue));
urlValue.Dispose();
cmdInsert.PropertyValues.Add(new PropertyValue("GEOM", geomValue));
geomValue.Dispose();
IReader cmdRead = cmdInsert.Execute();
cmdRead.Close();
cmdRead.Dispose();
cmdInsert.PropertyValues.Clear();
I am looking for several days but I have not found. the problem is specific
to the provider KingOracle since it works fine in SQLServer.
thank you.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/insert-error-control-properties-with-KingOracle-tp7046704p7046704.html
Sent from the FDO Internals mailing list archive at Nabble.com.
More information about the fdo-internals
mailing list