9 Answers, 1 is accepted
0
Andrea
Top achievements
Rank 2
Iron
answered on 13 Feb 2009, 01:48 PM
UP, please. I need this information about my future projects.
Regards.
Regards.
0
Hi Andrea,
The only way at the moment is to map the xml column to a string and convert it in memory.
I have made a small forward mapped example for you but it should work reverse the same way.
Greetings,
Jan Blessenohl
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
The only way at the moment is to map the xml column to a string and convert it in memory.
I have made a small forward mapped example for you but it should work reverse the same way.
Greetings,
Jan Blessenohl
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Andrea
Top achievements
Rank 2
Iron
answered on 18 Feb 2009, 02:55 PM
This didnt mean that I can use the XML datatype in SQLServer 2008. The forward wizard will create at most a VARCHAR(MAX) column.
It's true?
Regards.
It's true?
Regards.
0
Hi Andrea,
I have tested it and I am getting an XML column in the table. I did use SQL2008 express
Greetings,
Jan Blessenohl
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I have tested it and I am getting an XML column in the table. I did use SQL2008 express
Greetings,
Jan Blessenohl
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Andrea
Top achievements
Rank 2
Iron
answered on 19 Feb 2009, 10:27 AM
How had you write this in the App.config through the Forward Wizard?
I mean the tag with db-sql-type = xml
Thanks
<field name="xml"> |
<extension key="db-column"> |
<extension key="db-type" value="LONGVARCHAR" /> |
<extension key="db-column-name" value="xml" /> |
<extension key="db-sql-type" value="xml" /> |
</extension> |
</field> |
I mean the tag with db-sql-type = xml
Thanks
0
Hi Andrea,
No, the comboboxes does not contain these settings, I did it by hand.
All the best,
Jan Blessenohl
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
No, the comboboxes does not contain these settings, I did it by hand.
All the best,
Jan Blessenohl
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Andrea
Top achievements
Rank 2
Iron
answered on 19 Feb 2009, 05:16 PM
:D
From your Telerik "OpenAccess ORM Programmer's Guide":
I hope that the wizards dont overwrite this hand-added code in App.config
Cheers.
From your Telerik "OpenAccess ORM Programmer's Guide":
It is not recommended to edit the metadata directly; you should use the Properties Dialog inside Visual Studio. The dialog appears by clicking on OpenAccess ORM | Mapping menu. It is also available as a menu entry, when you right click on a code element on your project's Class View.
For more information about these settings and the integration of OpenAccess ORM with Visual Studio® .NET refer to Telerik OpenAccess ORM in Microsoft Visual Studio .NET.
I hope that the wizards dont overwrite this hand-added code in App.config
Cheers.
0
Hello Andrea,
We are rapidly working on the documentation, as we know that it is not in the appropriate state. We are polishing all the old content that is incorrect, and adding new as well. We hope that we will have new and shiny documentation for the Q1 2009 release.
Kind regards,
Dimitar Kapitanov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
We are rapidly working on the documentation, as we know that it is not in the appropriate state. We are polishing all the old content that is incorrect, and adding new as well. We hope that we will have new and shiny documentation for the Q1 2009 release.
Kind regards,
Dimitar Kapitanov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
XXXX
Top achievements
Rank 1
answered on 25 May 2011, 12:47 PM
Since this thread came up in my search and helped me I would like to share my additions.
Following code blocks show how I extended the OA generated classes to handle XML data and XML Schema (stored as XML).
Hope this can be of help to others.
All comments are welcome.
Yours
B.
Following code blocks show how I extended the OA generated classes to handle XML data and XML Schema (stored as XML).
using
System.Xml;
namespace
XML_Column_Example
{
public
partial
class
TableWithXML
{
// private property _xml defined in the generated code
public
virtual
XmlDocument xml {
get
{
XmlDocument doc =
new
XmlDocument();
if
(!
string
.IsNullOrEmpty(
this
._xml))
doc.LoadXml(
this
._xml);
return
doc; }
set
{
this
._xml = value.InnerXml;
} } }
using
System.Xml;
using System.Xml.Schema;
namespace
XML_Column_Example
{
public
partial
class
TableWithXMLSchema
{
// private property _xmlSchema defined in the generated code
public
virtual
XmlSchema Schema
{
get
{
XmlSchema xsd =
new
XmlSchema();
if
(!
string
.IsNullOrEmpty(
this
._xmlSchema))
{
xsd = XmlSchema.Read(
new
StringReader(
this
._xmlSchema),
null
);
}
return
xsd;
}
set
{
StringWriter stringWriter =
new
StringWriter();
XmlTextWriter xmlTextWriter =
new
XmlTextWriter(stringWriter );
xmlTextWriter.Formatting = Formatting.Indented;
value.Write(xmlTextWriter);
xmlTextWriter.Flush();
this
._xmlSchema = stringWriter.ToString();
}
}
}
}
Hope this can be of help to others.
All comments are welcome.
Yours
B.