| re: Bulk Load Copy - nvarchar is not recognized
Hi Delerna,
I appologize for late answer and thank you ,that you write me too soon. Can you advice me with this problem again?
I have this xml schema:
<!-- schema for importing to MSSQL2005 to database with validating -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:element name="root" sql:is-constant="true">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="row" maxOccurs="unbounded" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="row" sql:relation="C_pho"> <!-- table name -->
<xsd:complexType>
<xsd:sequence>
<!-- elements -->
<xsd:element name="ID_OMEZ_PHO" type="xsd:string" minOccurs="0" />
<xsd:element name="ZKRATKA" type="xsd:string" minOccurs="0" />
<xsd:element name="POPIS" type="xsd:string" minOccurs="0" /> <!-- need max except 8000 chars -->
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
a this code in C#:
bulkLoad = new SQLXMLBulkLoadClass(); ;
bulkLoad.ConnectionString = textBox1.Text;
bulkLoad.ErrorLogFile = Application.ExecutablePath + "importXMLSupport_log.xml";
bulkLoad.KeepIdentity = false;
bulkLoad.SchemaGen = checkBox1.Checked;
bulkLoad.SGDropTables = checkBox1.Checked;
If chekbox1 is checked, I want to create table against xml schema in MSSQL2005.
But, I need nvarchar(max), yes, navarchar allows up to 8000 character or max, what is about 2 giga characters.
Question is: How can I set 'max' in xml schema?
thank for any advice.
|