VintaSoft Annotation .NET Plug-in Discussions
Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.
Board index < VintaSoft Imaging < VintaSoft Annotation .NET Plug-in Discussions
AnnotationCollection collection;
XmlDocument doc = new XmlDocument();
cmd.CommandText = "SELECT ... FROM ... WHERE Id=" + id + ";";
cmd.Connection = con2;
object obj = cmd.ExecuteScalar();
doc.InnerXml = obj.ToString();
collection = annotationViewer1.Annotations[0];
collection.Load(doc);
and this for saving them: XmlDocument doc = annotationViewer1.Annotations[0].Save();
cmd.CommandText = "UPDATE ... SET ...=@xmldata WHERE Id=" + id + ";";
SqlParameter sqlparam1 = new SqlParameter("@xmldata", SqlDbType.VarChar);
sqlparam1.Value = doc.InnerXml;
cmd.Parameters.Add(sqlparam1);
cmd.Connection = con2;
cmd.ExecuteNonQuery(); // dodanie rekordu zdjД™cia
Saving operation is ok.