<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="address"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
h3
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:13.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.E-postmall17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hello <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have tried to read from OracleSpatial (ver 10.2.0), change
some value and then do an update with the following lines of code (C#). <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>OGR.Driver d =
OGR.ogr.GetDriverByName("OCI");<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>OGR.DataSource ds =
d.Open(@"OCI:wmgis/wmgis01@WMSI1394", 1);<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>OGR.Layer l = ds.GetLayerByName("baggis_lines");<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>OGR.Feature f =
l.GetFeature(0);<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>OGR.Geometry g =
f.GetGeometryRef();<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>g = g.Clone();<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=blue
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>double</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> x = g.GetX(0);<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=blue
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>double</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> y = g.GetY(0);<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=blue
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>double</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> z = g.GetZ(0);<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>x += 1.0;<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>y += 1.0;<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>textBox1.Text +=
"x="+ x + " y=" + y + System.Environment.NewLine;<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>l.StartTransaction();<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>g.SetPoint(0, x, y, z);<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>f.SetGeometryDirectly(g);<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>f.SetField("TEXT",
"OLLE");<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>l.SetFeature(f);<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>l.CommitTransaction();<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>textBox1.Text +=
"count=" + l.GetFeatureCount(1) + System.Environment.NewLine;;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><st1:City w:st="on"><st1:place w:st="on"><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>Reading</span></font></st1:place></st1:City><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> from works
fine but when I call the SetFeature method it fails.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The error-message I can see in the Output win is:<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New"'>ERROR 1:
OGROCITableLayer::SetFeature(-1) failed because there is no apparent FID column
on table BAGGIS_LINES.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>What’s wrong?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>What I want was to read a record, change some value and then
write it back.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Any assistance would be great.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Regards<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Johan<o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:black'>__________________________________<o:p></o:p></span></font></p>
<div>
<h3 style='margin:0cm;margin-bottom:.0001pt'><u1:PersonName ProductID="Johan Hallgren" u2:st="on"><st1:PersonName
ProductID="Johan Hallgren" w:st="on"><b><font size=3 color=black face=Arial><span
style='font-size:12.0pt;font-family:Arial;color:black'>Johan Hallgren</span></font></b></st1:PersonName><font
size=3 color=black face=Arial><span style='font-size:12.0pt;font-family:Arial;
color:black'><br>
</span></font><font size=1 color=black face=Arial><span style='font-size:9.0pt;
font-family:Arial;color:black'></u1:PersonName>WM-data</span></font><o:p></o:p></h3>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=1 color=black face=Arial><span style='font-size:9.0pt;font-family:Arial;
color:black'>Pelle Bergs backe 3<br>
<st1:address w:st="on"><st1:Street w:st="on">Box</st1:Street> 1938</st1:address>, 791
19 Falun<br>
Tel: 023-844 65 (int: +46-2384465)<br>
Mobil: 070-588 44 28 (int: +46-705884428)<br>
</span></font><u><font size=1 color=blue face=Arial><span style='font-size:
9.0pt;font-family:Arial;color:blue'>johan.e.hallgren</span></font></u><font
size=1 color=black face=Arial><span lang=SV style='font-size:9.0pt;font-family:
Arial;color:black'><a href="mailto:johan.e.hallgren@wmdata.com" target="_blank"
title="blocked::mailto:johan.e.hallgren@wmdata.com mailto:johan.e.hallgren@wmdata.com"><span
lang=EN-US>@wmdata.com</span></a></span></font><u><font size=1 color=blue
face=Arial><span style='font-size:9.0pt;font-family:Arial;color:blue'><br>
</span></font></u><font size=1 color=black face=Arial><span lang=SV
style='font-size:9.0pt;font-family:Arial;color:black'><a
href="http://www.wmdata.se" target="_blank"
title="blocked::/exchweb/bin/redir.asp?URL=http://www.wmdata.se/ /exchweb/bin/redir.asp?URL=http://www.wmdata.se/"><span
lang=EN-US>http://www.wmdata.se</span></a></span></font><font size=2
color=black face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:black'><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>