Click here to Skip to main content
16,008,010 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to write a IF Condition in Stored Procedure Pin
Christian Graus7-Oct-09 15:11
protectorChristian Graus7-Oct-09 15:11 
AnswerRe: How to write a IF Condition in Stored Procedure Pin
praveen.c@byzan.com8-Oct-09 0:22
praveen.c@byzan.com8-Oct-09 0:22 
QuestionImpersonation failing for a user. Pin
pankazmittal7-Oct-09 8:20
pankazmittal7-Oct-09 8:20 
QuestionDoes app_data get overwritten? Pin
NJlowB7-Oct-09 4:33
NJlowB7-Oct-09 4:33 
AnswerRe: Does app_data get overwritten? Pin
Kannan Ar7-Oct-09 4:39
professionalKannan Ar7-Oct-09 4:39 
Questionread xml file from the server using javascript [modified] Pin
dayakar_dn7-Oct-09 4:03
dayakar_dn7-Oct-09 4:03 
AnswerRe: read xml file from the server using javascript Pin
Manas Bhardwaj7-Oct-09 4:06
professionalManas Bhardwaj7-Oct-09 4:06 
Questionexecute ssis from asp.net Pin
arkiboys7-Oct-09 3:45
arkiboys7-Oct-09 3:45 
Hi,
I have created a SSIS package with the following task:
1-Execute a SQL Task to delete the data in a table

I can execute this package from ASP.NET and all seems fine.

Now i have modified the SSIS package by adding a control flow which imports data from excel into the deleted table in step 1.

The ssis package on it's own works fine.
Now I try once again to execute the ssis package from ASp.NET.
I get a failure and i know the problem is to do with the excel connection but can not figure out what needs to be edited in the code to correct this issue.

here is the code to execute the ssis package from ASp.NET in C#

I have indicated where the problem seems to be.
Any thoughts please?


protected void btnExecute_Click(object sender, EventArgs e)
         {
                  Application app = new Application();
                  Package package = null;

                  try
                  {
                           string fileName =
                                    Server.MapPath(System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName.ToString()));
                                    FileUpload1.PostedFile.SaveAs(fileName);

                           //Load DTSX
                           package = app.LoadPackage(@"C:\Work\Package1.dtsx", null);
                          
                           //Global Package Variable
                           Variables vars = package.Variables;
                           vars["Business_ID"].Value = txtBusinessID.Text;
                           vars["Business_Name"].Value = txtBusinessName.Text;
                          
//PROBLEM is on this connectionstring for eacel...
                           //Specify Excel Connection From DTSX Connection Manager
                           package.Connections["SourceConnectionExcel"].ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileName + ";Extended Properties=Excel 8.0;";
                          
                           //Execute DTSX.
                           Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();
                           lblResult.Text = results.ToString();
                  }
                  catch (Exception ex)
                  {
                           throw ex;
                  }
                  finally
                  {
                           package.Dispose();
                           package = null;
                  }

         }
AnswerRe: execute ssis from asp.net Pin
dojohansen7-Oct-09 4:01
dojohansen7-Oct-09 4:01 
GeneralRe: execute ssis from asp.net [modified] Pin
arkiboys7-Oct-09 4:10
arkiboys7-Oct-09 4:10 
GeneralRe: execute ssis from asp.net Pin
dojohansen7-Oct-09 4:43
dojohansen7-Oct-09 4:43 
GeneralRe: execute ssis from asp.net Pin
dojohansen7-Oct-09 4:50
dojohansen7-Oct-09 4:50 
GeneralRe: execute ssis from asp.net Pin
arkiboys7-Oct-09 5:11
arkiboys7-Oct-09 5:11 
GeneralRe: execute ssis from asp.net Pin
dojohansen7-Oct-09 7:04
dojohansen7-Oct-09 7:04 
GeneralRe: execute ssis from asp.net Pin
arkiboys7-Oct-09 11:23
arkiboys7-Oct-09 11:23 
GeneralRe: execute ssis from asp.net Pin
dojohansen7-Oct-09 11:28
dojohansen7-Oct-09 11:28 
GeneralRe: execute ssis from asp.net Pin
arkiboys7-Oct-09 5:10
arkiboys7-Oct-09 5:10 
GeneralRe: execute ssis from asp.net Pin
dojohansen7-Oct-09 11:29
dojohansen7-Oct-09 11:29 
GeneralRe: execute ssis from asp.net Pin
arkiboys7-Oct-09 11:34
arkiboys7-Oct-09 11:34 
Questionperevent deletion file???????? Pin
azamt7-Oct-09 3:30
azamt7-Oct-09 3:30 
AnswerRe: perevent deletion file???????? Pin
Manas Bhardwaj7-Oct-09 3:52
professionalManas Bhardwaj7-Oct-09 3:52 
AnswerIf at first you don't succeed, repost the question Pin
Not Active7-Oct-09 6:47
mentorNot Active7-Oct-09 6:47 
AnswerRe: perevent deletion file???????? Pin
Christian Graus7-Oct-09 9:55
protectorChristian Graus7-Oct-09 9:55 
QuestionHow to transfer the collected values of javascript in ajax Pin
-Muc_7-Oct-09 3:25
-Muc_7-Oct-09 3:25 
AnswerRe: How to transfer the collected values of javascript in ajax Pin
Kannan Ar7-Oct-09 4:05
professionalKannan Ar7-Oct-09 4:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.