EDN Admin
Well-known member
I have posted this in another forum. Nobody answered it. Try my luck here.
Here is an example to use SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class -
<div style="color:Black;background-color:White; <pre>
[STAThread]
<span style="color:Blue; static <span style="color:Blue; void Main(<span style="color:Blue; string[] args)
{
<span style="color:Blue; try
{
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class objBL = <span style="color:Blue; new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();
objBL.ConnectionString = <span style="color:#A31515; "Provider=sqloledb;server=server;database=databaseName;integrated security=SSPI";
objBL.ErrorLogFile = <span style="color:#A31515; "error.xml";
objBL.KeepIdentity = <span style="color:Blue; false;
objBL.Execute (<span style="color:#A31515; "schema.xml",<span style="color:#A31515; "data.xml");
}
<span style="color:Blue; catch(Exception e)
{
Console.WriteLine(e.ToString());
}
}
[/code]
<br/>
It seems that schema.xml must be annotated with sql information to make importing successful. Regular xsd file does not work.
Is there any tools or ways to automate the generation of annotate information basing on xsd file? I could not find any through Internet Search. I wonder how SSIS can achieve this. Is there any component doing this so I can include it in my .NET application?
View the full article
Here is an example to use SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class -
<div style="color:Black;background-color:White; <pre>
[STAThread]
<span style="color:Blue; static <span style="color:Blue; void Main(<span style="color:Blue; string[] args)
{
<span style="color:Blue; try
{
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class objBL = <span style="color:Blue; new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();
objBL.ConnectionString = <span style="color:#A31515; "Provider=sqloledb;server=server;database=databaseName;integrated security=SSPI";
objBL.ErrorLogFile = <span style="color:#A31515; "error.xml";
objBL.KeepIdentity = <span style="color:Blue; false;
objBL.Execute (<span style="color:#A31515; "schema.xml",<span style="color:#A31515; "data.xml");
}
<span style="color:Blue; catch(Exception e)
{
Console.WriteLine(e.ToString());
}
}
[/code]
<br/>
It seems that schema.xml must be annotated with sql information to make importing successful. Regular xsd file does not work.
Is there any tools or ways to automate the generation of annotate information basing on xsd file? I could not find any through Internet Search. I wonder how SSIS can achieve this. Is there any component doing this so I can include it in my .NET application?
View the full article