Showing posts with label written. Show all posts
Showing posts with label written. Show all posts

Wednesday, March 21, 2012

Failed to call SSIS package from ASPX C# Web Page

Hi, Everyone:

I am getting the following error message when I try to execute a SSIS package from an asp.net page written in C# 2.0. What I am trying to do is basically just click on a button in the web page and it will execute the package. The code to execute the package is pretty simple. I pass the path of the DTS package stored in the local folder. This works fine in the machine where SQL2005 is installed locally. But it fail when I have a seperate Web Server and SQL Server. Any ideas? Do I have to install SSIS or SQL2005 on a web server as well?

Thanks

static public string Execute_SSIS_DTS(string DTS_Path)

{

Microsoft.SqlServer.Dts.Runtime.Application app;

app = new Microsoft.SqlServer.Dts.Runtime.Application();

Package package = app.LoadPackage(DTS_Path, null);

DTSExecResult result = package.Execute();

return result.ToString();

}

Retrieving the COM class factory for component with CLSID {E44847F1-FD8C-4251-B5DA-B04BB22E236E} failed due to the following error: 80040154.

Line 226: static public string Execute_SSIS_DTS(string DTS_Path)

Line 227: {

Line 228: Application app = new Application();

Line 229: Package package = app.LoadPackage(DTS_Path, null);

Line 230: DTSExecResult result = package.Execute();

[COMException (0x80040154): Retrieving the COM class factory for component with CLSID {E44847F1-FD8C-4251-B5DA-B04BB22E236E} failed due to the following error: 80040154.]
Microsoft.SqlServer.Dts.Runtime.Application..ctor() +43

[DtsPipelineException: Retrieving the COM class factory for component with CLSID {E44847F1-FD8C-4251-B5DA-B04BB22E236E} failed due to the following error: 80040154.]
Microsoft.SqlServer.Dts.Runtime.Application..ctor() +169
Utilities.Execute_SSIS_DTS(String DTS_Path) in c:\Inetpub\wwwroot\MasterTables\App_Code\Utilities.cs:228
MasterTables_Admin_MasterTables_LOINC_External.btn_SyncLISTest_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\MasterTables\MasterTables_Custom\MasterTablesCustom_LOINC_External.aspx.cs:98
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +114
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +141
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3215

Yes, to use SSIS object model and to execute package you do need to install SSIS on this machine, of course.

See my blog entry for some more details
http://blogs.msdn.com/michen/archive/2006/08/11/package-exec-location.aspx

Sunday, February 26, 2012

Facing Error in Select statement

I have written one procedure .in that i have put following login.but I got
the error.
Declare
@.purgecount int,
@.totcovchrg money,
@.totpaymntamt money,
@.totreimamt money
Select
@.purgecount = count(D.EventID),
@.totcovchrg = sum(CoverChrgAmt),
@.totpaymntamt = sum(PayDetail.PaymntAmt),
@.totreimamt = sum(CalcTotalReimAmt)
from DelReimb D, Reimburse R, ReimburseOut RO,
(select isnull(sum(PaymntAmt),0) PaymntAmt,ClaimID,EventID
from PaymentsDetail
where isnull(InvalidPayInd,'') <> 'Y' and
PaymntInd not in ('A','B','X')
group by ClaimID,EventID) PayDetail
where
D.ClaimID = R.ClaimID and
D.EventID = R.EventID and
D.ClaimID = RO.ClaimID and
D.EventID = RO.EventID and
D.ClaimID = PayDetail.ClaimID and
D.EventID = PayDetail.EventID
Error :
A SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.
Please tell me how to over come thisHi
You are missing a comma after the ISNULL statement
(select isnull(sum(PaymntAmt),0),PaymntAmt,Claim
ID,EventID
It is always worth posting DDL and example data
http://www.aspfaq.com/etiquette.asp?id=5006 so people can post your query
into Query Analyser
John
"spc" wrote:

> I have written one procedure .in that i have put following login.but I got
> the error.
>
> Declare
> @.purgecount int,
> @.totcovchrg money,
> @.totpaymntamt money,
> @.totreimamt money
>
> Select
> @.purgecount = count(D.EventID),
> @.totcovchrg = sum(CoverChrgAmt),
> @.totpaymntamt = sum(PayDetail.PaymntAmt),
> @.totreimamt = sum(CalcTotalReimAmt)
> from DelReimb D, Reimburse R, ReimburseOut RO,
> (select isnull(sum(PaymntAmt),0) PaymntAmt,ClaimID,EventID
> from PaymentsDetail
> where isnull(InvalidPayInd,'') <> 'Y' and
> PaymntInd not in ('A','B','X')
> group by ClaimID,EventID) PayDetail
> where
> D.ClaimID = R.ClaimID and
> D.EventID = R.EventID and
> D.ClaimID = RO.ClaimID and
> D.EventID = RO.EventID and
> D.ClaimID = PayDetail.ClaimID and
> D.EventID = PayDetail.EventID
>
> Error :
> A SELECT statement that assigns a value to a variable must not be combined
> with data-retrieval operations.
>
> Please tell me how to over come this
>

Facing Error in Select statement

I have written one procedure .in that i have put following login.but I got
the error.
Declare
@.purgecount int,
@.totcovchrg money,
@.totpaymntamt money,
@.totreimamt money
Select
@.purgecount = count(D.EventID),
@.totcovchrg = sum(CoverChrgAmt),
@.totpaymntamt = sum(PayDetail.PaymntAmt),
@.totreimamt = sum(CalcTotalReimAmt)
from DelReimb D, Reimburse R, ReimburseOut RO,
(select isnull(sum(PaymntAmt),0) PaymntAmt,ClaimID,EventID
from PaymentsDetail
where isnull(InvalidPayInd,'') <> 'Y' and
PaymntInd not in ('A','B','X')
group by ClaimID,EventID) PayDetail
where
D.ClaimID = R.ClaimID and
D.EventID = R.EventID and
D.ClaimID = RO.ClaimID and
D.EventID = RO.EventID and
D.ClaimID = PayDetail.ClaimID and
D.EventID = PayDetail.EventID
Error :
A SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.
Please tell me how to over come thisHi
You are missing a comma after the ISNULL statement
(select isnull(sum(PaymntAmt),0),PaymntAmt,ClaimID,EventID
It is always worth posting DDL and example data
http://www.aspfaq.com/etiquette.asp?id=5006 so people can post your query
into Query Analyser
John
"spc" wrote:
> I have written one procedure .in that i have put following login.but I got
> the error.
>
> Declare
> @.purgecount int,
> @.totcovchrg money,
> @.totpaymntamt money,
> @.totreimamt money
>
> Select
> @.purgecount = count(D.EventID),
> @.totcovchrg = sum(CoverChrgAmt),
> @.totpaymntamt = sum(PayDetail.PaymntAmt),
> @.totreimamt = sum(CalcTotalReimAmt)
> from DelReimb D, Reimburse R, ReimburseOut RO,
> (select isnull(sum(PaymntAmt),0) PaymntAmt,ClaimID,EventID
> from PaymentsDetail
> where isnull(InvalidPayInd,'') <> 'Y' and
> PaymntInd not in ('A','B','X')
> group by ClaimID,EventID) PayDetail
> where
> D.ClaimID = R.ClaimID and
> D.EventID = R.EventID and
> D.ClaimID = RO.ClaimID and
> D.EventID = RO.EventID and
> D.ClaimID = PayDetail.ClaimID and
> D.EventID = PayDetail.EventID
>
> Error :
> A SELECT statement that assigns a value to a variable must not be combined
> with data-retrieval operations.
>
> Please tell me how to over come this
>

Facing Error in Select statement

I have written one procedure .in that i have put following login.but I got
the error.
Declare
@.purgecount int,
@.totcovchrg money,
@.totpaymntamt money,
@.totreimamt money
Select
@.purgecount = count(D.EventID),
@.totcovchrg = sum(CoverChrgAmt),
@.totpaymntamt = sum(PayDetail.PaymntAmt),
@.totreimamt = sum(CalcTotalReimAmt)
from DelReimb D, Reimburse R, ReimburseOut RO,
(select isnull(sum(PaymntAmt),0) PaymntAmt,ClaimID,EventID
from PaymentsDetail
where isnull(InvalidPayInd,'') <> 'Y' and
PaymntInd not in ('A','B','X')
group by ClaimID,EventID) PayDetail
where
D.ClaimID = R.ClaimID and
D.EventID = R.EventID and
D.ClaimID = RO.ClaimID and
D.EventID = RO.EventID and
D.ClaimID = PayDetail.ClaimID and
D.EventID = PayDetail.EventID
Error :
A SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.
Please tell me how to over come this
Hi
You are missing a comma after the ISNULL statement
(select isnull(sum(PaymntAmt),0),PaymntAmt,ClaimID,EventID
It is always worth posting DDL and example data
http://www.aspfaq.com/etiquette.asp?id=5006 so people can post your query
into Query Analyser
John
"spc" wrote:

> I have written one procedure .in that i have put following login.but I got
> the error.
>
> Declare
> @.purgecount int,
> @.totcovchrg money,
> @.totpaymntamt money,
> @.totreimamt money
>
> Select
> @.purgecount = count(D.EventID),
> @.totcovchrg = sum(CoverChrgAmt),
> @.totpaymntamt = sum(PayDetail.PaymntAmt),
> @.totreimamt = sum(CalcTotalReimAmt)
> from DelReimb D, Reimburse R, ReimburseOut RO,
> (select isnull(sum(PaymntAmt),0) PaymntAmt,ClaimID,EventID
> from PaymentsDetail
> where isnull(InvalidPayInd,'') <> 'Y' and
> PaymntInd not in ('A','B','X')
> group by ClaimID,EventID) PayDetail
> where
> D.ClaimID = R.ClaimID and
> D.EventID = R.EventID and
> D.ClaimID = RO.ClaimID and
> D.EventID = RO.EventID and
> D.ClaimID = PayDetail.ClaimID and
> D.EventID = PayDetail.EventID
>
> Error :
> A SELECT statement that assigns a value to a variable must not be combined
> with data-retrieval operations.
>
> Please tell me how to over come this
>

Friday, February 17, 2012

Extracting Data from SQL CE SDF file

Hi,

I have written application for Pocket PC it stores data on SQL CE database with extension .sdf. I have added data to the table and synchronised to the SQl server. I got the data, then unfortunately i deleted the data in SQL Server, I want to extract the data again from .SDF file of Pocket PC.

Is this possible if not then how can i get the data from SDF to SQL Server

Its very urgent and waiting for early reply to following mail address
prashanthk@.mmi.ae

Regards,
Prashanththere are a couple of options Prashanth:

1. write a simple smart device program that connects to the database and table by table writes out the rows in those tables to CSV files on device. copy the CSV files to the server and import into SQL Server.

2. there are third party tools that can connect to a SQL CE .SDF file on device and query their contents. DesktopSqlCe is available for download here: http://www.primeworks.pt/

3. convert your SQL CE database to a SQL Mobile database and connect to it from Visual Studio 2005 or SQL Server 2005 Management Studio (then select out your records into another SQL Server DB).

-Darren Shaffer|||

Darren,
Can you tell me how to move an .sdf file from sql ce to sql server. I want sdf table data to append with SQL Server's existing data. Is it posible?

Thnx

Raj

|||

With SQL CE, you can't do anything with the .SDF file on your server. You need to get the data out of SQL CE while it is still on a device or emulator and transport the data (not the .SDF file) to your SQL Server. I listed the options for this - it would be very quick to simply write a program that selects out the data from SQL CE and saves it in CSV files. You can then copy the CSV files from your device to your server and then import the data into SQL Server directly from the CSV files. A third party tool like RemoteSQLCE will also handle this for you.

-Darren

|||

Darren,

Thanks a lot for your suggestions, I was looking for tools to analyse sdf databases on a Windows XP environment for a long time!

- Jeroen Boiten

|||

Hallo, I'm Gabriel and I'm working with .NET 2005 and Pocket PC 2003.

I'm very very interested of first point, the one with the CSV export.Do you have an exemple ?

I'm very time stress.

Extracting Data from SQL CE SDF file

Hi,

I have written application for Pocket PC it stores data on SQL CE database with extension .sdf. I have added data to the table and synchronised to the SQl server. I got the data, then unfortunately i deleted the data in SQL Server, I want to extract the data again from .SDF file of Pocket PC.

Is this possible if not then how can i get the data from SDF to SQL Server

Its very urgent and waiting for early reply to following mail address
prashanthk@.mmi.ae

Regards,
Prashanththere are a couple of options Prashanth:

1. write a simple smart device program that connects to the database and table by table writes out the rows in those tables to CSV files on device. copy the CSV files to the server and import into SQL Server.

2. there are third party tools that can connect to a SQL CE .SDF file on device and query their contents. DesktopSqlCe is available for download here: http://www.primeworks.pt/

3. convert your SQL CE database to a SQL Mobile database and connect to it from Visual Studio 2005 or SQL Server 2005 Management Studio (then select out your records into another SQL Server DB).

-Darren Shaffer|||

Darren,
Can you tell me how to move an .sdf file from sql ce to sql server. I want sdf table data to append with SQL Server's existing data. Is it posible?

Thnx

Raj

|||

With SQL CE, you can't do anything with the .SDF file on your server. You need to get the data out of SQL CE while it is still on a device or emulator and transport the data (not the .SDF file) to your SQL Server. I listed the options for this - it would be very quick to simply write a program that selects out the data from SQL CE and saves it in CSV files. You can then copy the CSV files from your device to your server and then import the data into SQL Server directly from the CSV files. A third party tool like RemoteSQLCE will also handle this for you.

-Darren

|||

Darren,

Thanks a lot for your suggestions, I was looking for tools to analyse sdf databases on a Windows XP environment for a long time!

- Jeroen Boiten

|||

Hallo, I'm Gabriel and I'm working with .NET 2005 and Pocket PC 2003.

I'm very very interested of first point, the one with the CSV export.Do you have an exemple ?

I'm very time stress.

Extracting Data from SQL CE SDF file

Hi,

I have written application for Pocket PC it stores data on SQL CE database with extension .sdf. I have added data to the table and synchronised to the SQl server. I got the data, then unfortunately i deleted the data in SQL Server, I want to extract the data again from .SDF file of Pocket PC.

Is this possible if not then how can i get the data from SDF to SQL Server

Its very urgent and waiting for early reply to following mail address
prashanthk@.mmi.ae

Regards,
Prashanththere are a couple of options Prashanth:

1. write a simple smart device program that connects to the database and table by table writes out the rows in those tables to CSV files on device. copy the CSV files to the server and import into SQL Server.

2. there are third party tools that can connect to a SQL CE .SDF file on device and query their contents. DesktopSqlCe is available for download here: http://www.primeworks.pt/

3. convert your SQL CE database to a SQL Mobile database and connect to it from Visual Studio 2005 or SQL Server 2005 Management Studio (then select out your records into another SQL Server DB).

-Darren Shaffer|||

Darren,
Can you tell me how to move an .sdf file from sql ce to sql server. I want sdf table data to append with SQL Server's existing data. Is it posible?

Thnx

Raj

|||

With SQL CE, you can't do anything with the .SDF file on your server. You need to get the data out of SQL CE while it is still on a device or emulator and transport the data (not the .SDF file) to your SQL Server. I listed the options for this - it would be very quick to simply write a program that selects out the data from SQL CE and saves it in CSV files. You can then copy the CSV files from your device to your server and then import the data into SQL Server directly from the CSV files. A third party tool like RemoteSQLCE will also handle this for you.

-Darren

|||

Darren,

Thanks a lot for your suggestions, I was looking for tools to analyse sdf databases on a Windows XP environment for a long time!

- Jeroen Boiten

|||

Hallo, I'm Gabriel and I'm working with .NET 2005 and Pocket PC 2003.

I'm very very interested of first point, the one with the CSV export.Do you have an exemple ?

I'm very time stress.