G
Guest
Hi i am trying to get working sqlxmlbulkload4.0 with asp.net 1.1
i am using that code with windows application and its working fine but when
i try with asp.net application it give me that error
it open debugger windows with that error An unhandled expection
("System.Runtime.InteropServices.COMException")
occurred in aspnet_wp.exe [2760
my code is below
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Threading;
namespace SQLXMLBulkLoadWeb
{
/// <summary>
/// Summary description for XMLBulkLoad.
/// </summary>
public class XMLBulkLoad
{
public XMLBulkLoad()
{
//
// TODO: Add constructor logic here
//
}
public static void XMLBulkLoadStart()
{
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class objBL = new
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();
objBL.ConnectionString
="Provider=sqloledb;Server=server1;uid=test;pwd=test;Database=TestBulkLoad;Trusted_Connection=False;";
objBL.KeepIdentity = false;
objBL.CheckConstraints=false;
objBL.IgnoreDuplicateKeys=false;
objBL.KeepNulls=true;
objBL.Execute
(@"http://Localhost/SQLXMLBulkLoadWeb/RawData_PCIP.XSD",@"http://Localhost/SQLXMLBulkLoadWeb/RawData_PCIP.XML");
}
}
public class XMLThread
{
public XMLThread()
{
}
[STAThread]
public static void StartXMLThread()
{
Thread t=new Thread(new ThreadStart(XMLBulkLoad.XMLBulkLoadStart));
t.ApartmentState=System.Threading.ApartmentState.STA;
t.Start();
}
}
}
any body has any idea .. i tried several methods of path like
Server.Map(FileName);
but no luck
i am using that code with windows application and its working fine but when
i try with asp.net application it give me that error
it open debugger windows with that error An unhandled expection
("System.Runtime.InteropServices.COMException")
occurred in aspnet_wp.exe [2760
my code is below
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Threading;
namespace SQLXMLBulkLoadWeb
{
/// <summary>
/// Summary description for XMLBulkLoad.
/// </summary>
public class XMLBulkLoad
{
public XMLBulkLoad()
{
//
// TODO: Add constructor logic here
//
}
public static void XMLBulkLoadStart()
{
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class objBL = new
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();
objBL.ConnectionString
="Provider=sqloledb;Server=server1;uid=test;pwd=test;Database=TestBulkLoad;Trusted_Connection=False;";
objBL.KeepIdentity = false;
objBL.CheckConstraints=false;
objBL.IgnoreDuplicateKeys=false;
objBL.KeepNulls=true;
objBL.Execute
(@"http://Localhost/SQLXMLBulkLoadWeb/RawData_PCIP.XSD",@"http://Localhost/SQLXMLBulkLoadWeb/RawData_PCIP.XML");
}
}
public class XMLThread
{
public XMLThread()
{
}
[STAThread]
public static void StartXMLThread()
{
Thread t=new Thread(new ThreadStart(XMLBulkLoad.XMLBulkLoadStart));
t.ApartmentState=System.Threading.ApartmentState.STA;
t.Start();
}
}
}
any body has any idea .. i tried several methods of path like
Server.Map(FileName);
but no luck