Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server






SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







How To Execute The .rdl File In Asp Dotnet With C# 2005


 

hi friends,
 
i want to run the .rdl file(report file)  in asp dotnet 2005 with c#
 
so please send me the coding
 
regards
koti


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Req DOTNET Developer
DOTNET DEVELOPERLocation : Raleigh, NCDuration : 6 MonthsStart Date : ASAPRequired:·Minimum of 3 years experience as a VB.NET in programmer and analyst.·Minimum of 5 years experience in developing ASP.NET and .NETapplications that use MS SQL Server 2000 and Oracle databases.·Strong VB.NET developer with extensive .Net 2.0·Experience developing complex Graphical User Interfaces.·Strong skills in object oriented programming including schema layerand database layer development.Preferred:·Experience with XML and interfacing with web services.Please send me your updated resume for below requirement.Reply ASAP,Thanks And BestRegrdsDeepak KumarSpectraforce technologiesContact: 919-341-8358Email: Join Bytes!Join Bytes!Visit : www.spectraforce.com

View Replies !   View Related
ASP DotNet && ReportViewer
Hello,

 

I'm building a web application that will include reporting services reports.

All my web pages are builded using a master page. But when I try to add a reportviewer control (reports are on a remote server) the master pages show correctly but instead of my report I have :

ASP.NET ViewState has been disabled. The Report Viewer control requires that ViewState be enabled
.








Of course I allready have tried to enable the viewstate.

The reports shows correctly on a page without a master.

So if somebody knows how to solve this problem...

Thanks

Paul

 

View Replies !   View Related
How To Execute A &"batch File&" Using SQL Server 2005?
Hi all,As the topic describes, I'd like to run a batch file using sql server.How do i do it?Thanks in advance

View Replies !   View Related
About Building International Applications In Dotnet
 

Hi,

 

I am developing an application using C#.NET that accesses a remote database that that contains japanese characters.

 

My sample querry is strCommand = "SELECT * FROM table WHERE prodname = 'CR新海物語スペシャルM8'";

 

The result of querry displayed in the binded datagrid also contains other rows that has this prodname:

CRF湯�むり紀行SF�T
  CRã?±ã?¡ã‚“ã?“ãƒ?イサイVR1
  CRホワイトエンジェルFS

etc.

 

Thanks in advance for your help.

View Replies !   View Related
Invoking SSIS Packages From DotNet
Hi,

How can we invoke SSIS Packages from an Windows or ASP.NET Application (using C# ).

Thanks

Jegan

View Replies !   View Related
Dotnet 3.5 Runtime For Synchronisation Of Sql Server
Hi,

I downloaded orcas and created an  application which also has sql server synchronisation, now if i wish to run it on another m/c, where can i get the runtime for 3.5, I searched but could not find it.

 

Thanks

arnab

View Replies !   View Related
How To Call A DotNet Assembly In SSIS Script Component
I tried to access a dot net assembly (.dll) file in ssis script component using following steps.


Create new Script Task in Data Flow Task
Edit Design Script button-> Loads script Project in MS VSA
Locate Object Browser
Select Custom Component Set from the dropdown and hit browse button
Browse and place the custom component dll (This Custom component dll has to be in GAC - Global assembly cache before browsing)
Select the namespace from the Component list of the object browser and click on €œAdd to references to Selected project in the solution explorer€? button
Write Imports <namespace> in the script code to invoke class methods from the .NET custom component
The following steps worked properly with June CTP version of yukon.In september CTP version of Yukon in SSIS  when i browse the dot net assembly with the same above steps i get a error stating " The file could not be browsed ".Can anybody help me in the same.
 
Prashant Utekar

View Replies !   View Related
Stored Procedures On SQL 2000 Compared To Dotnet's Datatable.select
Hi,Has any one ever compared the performance of calling a DataTable'sSelect method with a stored procedure doing the same thing?My point is:dataRows = DataTable.Select(filter) is better orPassing paramters to stored procedure?The datatable holds about 500-700 rows at any given time.If I select one of the approaches the business logic will go intorespective layers.With dotnet in picture what would be a good approach- Have the data in Datatable and do a filter on the data or callstored procedures which has been the convention.Can some one pl. suggest?

View Replies !   View Related
Need Help!Can Grow Does Not Works Properly.Pictures In Crystal Reports And VB Dotnet
Dear All,

I am new to dot not. I'm using vbdot net 2003 with crystal reports that bundled with vs2003 for creating catalogues for our company. We have furniture pictures in access db. In design time I have added picture field to the crystal reports and ticked the cangrow property so the picture can fit into its true aspect ratio. but some pictures grow into full page of the report. unticking 'cangrow' property also makes trouble as the picture does't streches well. I want 6 pictures to appear in each page by 2 column wise(how to add 2 columns in a report?). We want to automate printing catalogues of chosen furnitures by our customers. I'm struck with this problem for past few days.
can anyone help with sample code please?


Thanks a lot in advance

View Replies !   View Related
VBS File To Execute SQL Job
I was wondering if anyone out there has any code to automate the execution of a SQL Job? The purpose of this is to run the vbs file locally (on local machine), connect to SQL server and run the SQL Job. I would appreciate this help. While I can run DTS packages, I am unable to "find" the SQL object to run the SQL Job. Again thanks.

View Replies !   View Related
Execute SQL From .sql File
Hi all,

I am trying to get an SSIS package to execute some sql in a .sql file or ideally all .sql files in a folder. Is there any way to do that? Thanks

View Replies !   View Related
Using Rs.exe To Execute .rss File
 
Hi,
 

I am calling xp_cmdshell from inside a stored procedure to generate reports dynamically.
 

EXEC master.dbo.xp_cmdshell 'rs.exe -i "C:Program FilesMicrosoft SQL Server90SamplesReporting ServicesScript SamplesSample1.rss" -s http://localhost/reportserver -v param1="10" -l 0 -e mgmt2000 -t -b'

 
In the .rss file, i use the following :

Dim parameters(1) As ParameterValue
parameters(0) = New ParameterValue()
parameters(0).Name = "s_no"
parameters(0).Value = param1
 

My question is how do I pass dynamic values in param1. I have a variable in my stored proc called @s_no which i try to pass like this, however it is not working.
 

EXEC master.dbo.xp_cmdshell 'rs.exe -i "C:Program FilesMicrosoft SQL Server90SamplesReporting ServicesScript SamplesSample1.rss" -s http://localhost/reportserver -v param1=@s_no -l 0 -e mgmt2000 -t -b'
 

Can anyone suggest how to do this? Over here, I want to pass the value of param1 dynamically.
 
Thanks.

View Replies !   View Related
Using Sql To Execute A Batch File
Is it possible to use sql to execute a batch file? I would like toexecute the following "C:BTWartend.exe /f=C:BTWToolboxFormatscarnum.btw /p", 6Thanks,Matt

View Replies !   View Related
How To Execute An Excel File Within DTS?
Hello All.

I need to execute an excel file (built with macro) whenever a date change is detected between 2 fields in my sql table.

if @Date1<>@Date2
begin
DECLARE @command varchar(1000)
SET @command='d:Refresh_ABC.bat'
exec xp_cmdshell @command
.
.
.

In my Refresh_ABC.bat, I have the following line
Start Excel.exe "D:ABC.xls"

When I tested the above script (from Declare... to @command) in query analyzer, nothing seems to happen. It shows The command(s) completed successfully. But my excel file was not refreshed at all. When I ran the batch file Refresh_ABC.bat on it's own, ABC.xls was refreshed so the batch file is working.

Next test, I placed the line Start Excel.exe "D:ABC.xls" on SET @command = ......... line. Same problem, nothing happened.

Any idea what went wrong. Please advise. Thank you.


Best regards
Teck Boon

View Replies !   View Related
Execute Batch File As Sql Job
I'm trying schedule a batch file to run as a job from sql server agent. The batch file copies files from one server directory to a directory on another server. The batch file works properly when executed directly. The job is being executed under the sql service account login. I've given the service account access to both the source and destination directories.

When I try to run the job it fails with an "Access is denied" error on both the source and destination directories (as read from job history).

Any ideas?

View Replies !   View Related
Execute Batch File
Hi,
I would like to ask someone who could help me with one small problem:

I would like to run SQL server task on one of my servers, that will connect
to all other servers (including ones that are not SQL servers, ie: Exchange,
Test Server etc) one at the time, and that will execute one batch file (update.bat) that is residing on each server under C: drive.

Batch file will copy some things from all of the servers to one server.

Thanks, in advance.

Regards,
Vilko

View Replies !   View Related
How Can I Execute The .SQL File In SQL Server
hi
i have some couple of .sql files. each file contains some tables creation and some stored procedures creation, i don't want to go to Query Analyzer open each SQL file and Execute, i want to execute all .SQL files at a time, how can i do this one.


Thanks in Advance..


Madhavi

View Replies !   View Related
Open More Than 1 .sql File Then Execute It Once
I'm using SQL Server 2005
I'm made 4 stored procedure and save it as
sp_process1.sql, sp_process2.sql, sp_process3.sql and sp_process4.sql

i want to deploy all above SP to another machine. So far, i open it 1 by 1 and click execute in SQL Query windows 1 by 1.

How to open all .sql files but execute it once. Is it possible? Anybody know the way?

What the best way to deploy stored procedure into another machine?

View Replies !   View Related
Execute A Batch File
Hi All,
I would like to embed some stored procedures in a batch file and execute it from the command prompt on windows.
I have no idea of how to embed a stored proc in a .bat file.
Can you please redirect me to the solution to this?

Thanks in advance
vishu

View Replies !   View Related
Execute Script From A File
This script shows how to load a SQL script file into a nvarchar(max) local variable and then execute it.


-- Execute_Script_From_File.sql
/*
Load a script from a text file and execute it.
The script must not contain a GO Statement
Runs in SQL Server 2005
*/

set nocount on
if object_id('tempdb..#FileData','U') is not null
begin drop table #FileData end

create table #FileData ( FileData nvarchar(max) )

declare @FileName varchar(255)
declare @SQLLoad nvarchar(max)
declare @Script nvarchar(max)

-- Set the file to load SQL Script from
set @FileName = 'C:MyDirMyScriptFile.sql'

-- Create command to load the file into temp table #FileData
set @SQLLoad =
N'insert into #FileData
select fd.*
from openrowset(bulk ''' + @FileName + ''',SINGLE_CLOB ) as FD'

-- Load file data into temp table #FileData
exec sp_executesql @SQLLoad

-- Load SQL into a local variable from temp table #FileData
select top 1 @Script = FileData from #FileData

-- Execute the script
exec sp_executesql @Script





CODO ERGO SUM

View Replies !   View Related
Execute SQL Outputting To A File
I continue to try and find "easy" solutions to what should be a straightforward problem of outputting the results from a stored procedure to a file.

 

I tried using both XML task and file system task with the thought that one of those would actually be able to output a file from a variable, but both of those tasks threw fits when I tried using different variable types (file system required a string, but the XML result set never seemed to throw anything but an object) so I decided to just try a script task and do everything "manually".

 

So my latest gyrations have been thus:

1) Set execute sql task to output XML and push to a script task to write a file

2) Set execute sql task to output a full result set and push to a script task to write a file

 

Number 1 was the only one I could get working, because I kept getting this error with Number 2 that said the variable wasn't a recordset (maybe it was null?)

 

I can actually create files now via the script task, but it seems like the variable that should get the results from the stored procedure isn't getting anything.  I tried using a MsgBox to see what was actually being passed to the script task, and all I got was the number 0 which I'm assuming is the default for the object type.

 

What's the best way to debug this?  The package runs without errors, and I'm not familiar with debugging in SSIS.  How can I tell if the stored procedure is returning results into the result set variable?

View Replies !   View Related
How To Execute Script (.sql) File?
 

Hi,
 
I have published a database on a client computer.
 
Now, I have generated a script file to make some changes to the database (like adding new columns etc)
 
How do I instruct my program to execute the script file ? The script file is a .sql file
 
Please provide the code in Visual Basic Language
 
Thanks

View Replies !   View Related
Execute A Vb.net File When I Make Some Changes In A Table
I want to execute a vb.net 
file

When I make some changes in a table.

 

How can I handle this situation?

 I am using sql server
2005 express edition sujith 

 

View Replies !   View Related
How Can I Execute A N Exe File From Stored Procedure?
hi to all,

i have a stored procedure and i want to run a program from it..
i think that i need use api functions but how can i do that..
if there is a nother ways please tell me..

thanx..

View Replies !   View Related
How To Execute SQL Scripts Using Batch File?
Hi,How can we execute SQL Scripts using Batch file???i think Batch file should contain Username,Password,Database andScripts...Using that file scripts should run...How can i give UserName,Password,Database and all those things?Plz send me details how to do that...if possible with example...Thanx in advance,RR...

View Replies !   View Related
Execute A Batch File From Within Sql Server
Hi, and thanks for your help. I have created a simple batch that xcopy files from one directory to another shared directory (in another server). Here is the code:
xcopy c:OUT_TRANSIT E:BACKUP_CESWEB /y

the E:BACKUP_CESWEB is in another server where I mapped the BACKP_CESWEB folder and make it shared.

the location of the batch file is in c:code .
When I double click the batch, the files are moved into E:BACKUP_CESWEB But when I use the window 2000 schedule or try to run the batch code from within sql server analyser, I get no results.

Any idea how to solve this.
The bottom line is that I want to copy files from one server to another server.Thanks for your help

Ali

View Replies !   View Related
How Do I Create A SQL Server Job To Execute A .exe File?
I am having trouble getting a job step to execute an executable file. One of the options for a job step is to enter an operating system command. I have tried entering the following operating system command to execute a file:

'start c:myfile.exe'

For some reason this doesn't work. How can I get SQL Server to execute an executable file?

View Replies !   View Related
How Do I Use Execute Process Task To Zip A File/fo
hi,

i have designed DTS packages, I have a script component that picks up the 'Path' of a file stored.
The Path is a column in database and that obtained from OLEDB source.

now i need to zip the files in the path given above and than store it in some location. How do I do that?

View Replies !   View Related
File Exists Then Execute Package
I want execute my package when a set of files exists in a
directory.  What is the best way of doing this?



 I have been successful in creating a WMI Event Watcher Task
that executes when any file (the first file) is added to a directory.  But
I can not figure out the WQL for a specific file or set files.



 What have you done with in SSIS to trigger the package?



 Thanks

View Replies !   View Related
Execute A Task Regardless Of Checkpoint File
 

I have a situation where I need to make sure a task executes regardless of whether the package starts from a checkpoint or not. Is this possible?

Here's the scenario:

I have a package with 3 tasks {TaskA, TaskB, TaskC} that execute serially using OnSuccess precedence constraints.
The package is setup to use checkpoints so that if a task fails the package will restart from that failed task
TaskA is insignificant here.
TaskB fetches some data and puts it in a raw file
TaskC inserts that raw file data into a table.

Problem is that the insertion violates an integrity constraint in the database - so it fails. The problem is easily fixed but it needs to be fixed in TaskB because that is where the data is sourced.

So, I need to be able to execute TaskB again, even though it was TaskC that failed. Currently the package restarts from TaskC which reuses the raw file (which has the bad data in it) so the package continues to fail even though the cause of the problem has been fixed.

How do I configure the package in order to execute TaskB again? Is it even possible?

A "No" would suffice!

Regards

-Jamie

View Replies !   View Related
Is It Possible To Execute A Container Regardless Of The Checkpoint File?
 

I have a situation where I need to make sure a task executes regardless of whether the package starts from a checkpoint or not. Is this possible?

Here's the scenario:

I have a package with 3 tasks {TaskA, TaskB, TaskC} that execute serially using OnSuccess precedence constraints.
The package is setup to use checkpoints so that if a task fails the package will restart from that failed task
TaskA is insignificant here.
TaskB fetches some data and puts it in a raw file
TaskC inserts that raw file data into a table.

Problem is that the insertion violates an integrity constraint in the database - so it fails. The problem is easily fixed but it needs to be fixed in TaskB because that is where the data is sourced.

So, I need to be able to execute TaskB again, even though it was TaskC that failed. Currently the package restarts from TaskC which reuses the raw file (which has the bad data in it) so the package continues to fail even though the cause of the problem has been fixed.

How do I configure the package in order to execute TaskB again? Is it even possible?

Regards

-Jamie

 

View Replies !   View Related
Is It Possible To Execute A Container Regardless Of The Checkpoint File?
I have a situation where I need to make sure a task executes regardless of whether the package starts from a checkpoint or not. Is this possible?

Here's the scenario:

I have a package with 3 tasks {TaskA, TaskB, TaskC} that execute serially using OnSuccess precedence constraints.
The package is setup to use checkpoints so that if a task fails the package will restart from that failed task
TaskA is insignificant here.
TaskB fetches some data and puts it in a raw file
TaskC inserts that raw file data into a table.

Problem is that the insertion violates an integrity constraint in the database - so it fails. The problem is easily fixed but it needs to be fixed in TaskB because that is where the data is sourced.

So, I need to be able to execute TaskB again, even though it was TaskC that failed. Currently the package restarts from TaskC which reuses the raw file (which has the bad data in it) so the package continues to fail even though the cause of the problem has been fixed.

How do I configure the package in order to execute TaskB again? Is it even possible?

Regards

-Jamie

 

View Replies !   View Related
Execute Stored Procedure From Code Behind File
hi all
I have to execute the stored procedure from code file
string constr = ConfigurationSettings.AppSettings["ConnectionString"];SqlConnection con = new SqlConnection(constr);con.Open();SqlCommand cmd = new SqlCommand("GetTax",con);cmd.CommandType = CommandType.StoredProcedure;SqlParameter paramFrom = new SqlParameter("@from", SqlDbType.VarChar, 50);paramFrom.Value = "JFK";SqlParameter paramTo = new SqlParameter("@To", SqlDbType.VarChar,50);paramTo.Value = "HOU";SqlParameter paramAirline = new SqlParameter("@Airline", SqlDbType.VarChar,50);paramAirline.Value = "US";SqlParameter rpTax = new SqlParameter("@Tax",SqlDbType.Int);rpTax.Direction = ParameterDirection.Output;cmd.Parameters.Add(rpTax);
insted of this way can i execute stored procedure any other way
like
exec MystoredProc "param1"."param2","param3"
 i appreciate u r help
 
 
 

View Replies !   View Related
How To Execute SQL Server DTS Package Using VB Script (.vbs File)
Hi

I have a set of DTS Package created in the local.I need to execute this DTS Package using VB Script (.VBS file) during the install process..

Is there any way i can do it...

Thanks
Kamalesh D

View Replies !   View Related
Execute A Task Even Though A Checkpoint File Says It Has Already Been Executed
I have the following scenario:

-I have a package that uses checkpoints

-The first task in that package (an Exec SQL Task) retrieves a timestamp value from an external source

-That timestamp value is used in data-flows to pull data that has been changed since then

-At the end of the package the value in the db is updated

 

Now...if something fails then on the next execution the checkpoint file will kick in. But this means that the first task (which retrieves the timestamp) will not execute and therefore all the data-flows will be pulling the wrong data.

The only way I can think of getting around this problem is to specify that a task should execute regardless of the presence of a checkpoint file. Unfortunately it seems this cannot be done.

Another option might be to put an OnPreExecute task on the package that gets the timestamp value.

 

Anyone got any advice about how I should progress? Short of a suggestion from elsewhere I'm going to go with the tactic of using the OnPreExecute to retrieve the timestamp.

Thanks in advance.

-Jamie

 

 

View Replies !   View Related
How Do I Execute A Batch File From Sqlserver 2000 T-sql?
I tried the following but file dir.rpt is never created.  in fact, the exec statement appears to lock-up forever.

 
exec xp_cmdshell 'c: empjunkdir.bat'

 
dir.bat Contains
dir c: > c: empjunkdir.rpt
 
This should be easy!

View Replies !   View Related
Using SqlDataSource To Execute A Select Statement In The Code File???
Hi you all,
In abc.aspx, I use a GridView and a SqlDataSource with a SelectCommand. The GridView's DataSourceID is the SqlDataSource.
In abc.aspx.cs, I would like to use an IF statement in which if a criterion is not satistied then I will use the SqlDataSource with another SelectCommand string. Unfortunately, I have yet to know how to write code lines in order to do that with the SqlDataSource. Plz help me out!

View Replies !   View Related
Ugrent Help: How To Write Code To Execute A Batch File
hi, I need to run a batch file in specific time of the week. can anyone show me the code to run a batch file with both ways: window nt schedualer and ms sql server task manger.... I do appreciate your help

Ali

View Replies !   View Related
Execute Command Process - Remote Batch File?
Good afternoon-  
 
Can a batch file that resides on another server be executed from a different machine? I have a batch file that resides on a server that I would like to run using SQL 2005 Integration Services. Is there anything I can do that would allow me to remotely execute this batch file and have it run in that environment. 
 
BATCH FILE:

cd C:Trandev
otrun -at OTRecogn.att -DINPUT_FILE=%1 -tl 1 -cs dv -lg mylog -I
C:Trandev represents the  remote environment 


I have tried mapping the remote machine to a network drive on my local machine and using that drive to execute the batch file in an Execute Process Task,  but it does not work.

SSIS:

I have a FOR EACH loop grabbing files and writing fileName to a variable that is passed to the Process Task as an argument through an expression(%1 in the batch file above). The Working Directory is a mapped network drive. The Executable is also a network drive plus batch file name.

 
Any help would be appreciated.
 
My computer is a HP Compaq dc7100, 512mb RAM, WindowsXP

View Replies !   View Related
%1 Is Not A Valid Win32 Application - Trying To Execute A Batch File
Today I ran into the error (see title of this post) while trying to execute a batch file using SSIS. If anyone else runs into this problem I want to point them to my post on the issue, as I did not easily find a solution when doing the search myself: http://blog.lyalin.com/2008/02/1-is-not-valid-win32-application-ssis.html
 
Summary (So you dont need to visit my blog):
 
I was trying to execute a totally empty placeholder batchfile and this produces the "%1 is not a valid win32 application" error when using Execute Process Task. Simply add something to your placeholder file (like DIR command) and you can continue running your package without error
 
I hope this saves someone time in the future.

 
Comments? If anything in my post is inaccurate I hope you guys post some corrections.
 
Regards,
 
Dmitry
http://blog.lyalin.com

View Replies !   View Related
Execute A Flatfile Source To Oledb Destination For Each File In A Folder.
Hello, I wanted to do the following.

Copy a full directory from source to destination (Done)

then for each file on the destination directory,it must process that file and insert rows on the table.

So I created a foreach loop, and created a varriable aclled CURRENTFILENAME, and assigned it into the foreachloop to index 0.

 

Inside the foreachloop I created a dataflow task, in the dataflow task I dragged a flat file source and an oledb destination, but I noticed that the flat file source requires flat file manager, and the flat file manager requires a unique FILE NAME. I cant put this c:copia*.txt.

I took a loot at flat file source properties and it has associated the flat file manager, but I can not assign the filename to the variable from the foreach.

 

Any ideas please

 

 

View Replies !   View Related
Calling Remote Batch File Using 'Execute Process Task'
I have a remote batch file on machine B that I need to execute using 'Execute process task' control from a package on machine A. The batch file uses pgp software and encrypts a file sitting on machine B itself. The reason why my batch file is sitting on machine B, is because the PGP software is on machine B.

If I execute the batch file by itself from machine B, the script runs fine. I refer the same batch file as a UNC path from my package on machine A. But that does not work since the 'Working directory' is still machine A. I can not set machine B's folder as the working dir because it does not accept UNC path. So I say, ok , let me map a path to that UNC location and map it as drive 'Z:'. Certainly if I do so, I will be running the process on machine A and the batch file will look for the pgp software on machine A, and hence fail.

I have tried third party remote batch execution tools (PSEXEC) but have not had success, not because of SSIS limitations, but simply because the PGP executable when run through the PSEXEC tool, does not identify the location of the public keys on machine B and hence gives an encrytion failure.

How do I get the remote batch file to execute such that it executes with its own env? Is there a better remote execution tool I can try or are there any other features of SSIS I can use to get around this issue? I need the results of the batch file and hence do not want to make it an asyncronous process.

Thanks

Sumeet

View Replies !   View Related
Unable To Execute DTS Package To Import Data From A DBASE File Using C#
Please help:

I created a DTS that imports data from a DBase file and puts it in a table on my SQL2000 Server. (It is able to access the DBase file via a local DNS that I created in my AdministrativeTools->DataSource).

 

I wrote the following C# code that is able to call and execute the DTS.


object pVarPersistStgOfHost = null;
DTS.Package pkg = new DTS.Package();
pkg.LoadFromSQLServer("VServer","VUser","VP888",DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, null,null,null,"DTSUpdateDbaseFilet",ref pVarPersistStgOfHost);
pkg.Execute();
pkg.Steps.ToString();

 

It works for all my DTS that transform data within my database. This even works on the computer that everything is on. My problem is when I try to execute this package via an application that is on another computer. The data doesn't get imported. (Note that the connection string is fine and that other DTS that transform data within other tables in the database works fine when executing from the remote computer/application).

View Replies !   View Related
Execute Process Task -- Redirect Standard Output To A File, Not A Variable
I'm trying to use "findstr.exe" to extract some lines of interest from a data file, which I will later load to a table.  I'd like to issue this form of a command:

 

findstr.exe "^SEARCHSTRING" "srcfile" > "dstfile"

 

I build the arguments using expressions, and both the search string and source file get correctly set.  However, the ">" seems to be ignored--I can see the lines spitting out to the temporary window when I run under VS. 

 

QUESTION:  how do you redirect the output of a command run under an Execute Process Task?

 

 

View Replies !   View Related
Fail Execute Process Task Based On Batch File ERRORLEVEL?
I am new to this, but have scoured the web and not found an answer to my question...

I have an execute process task that runs a simple batch file.  When this batch file completes with an ERRORLEVEL greater than 0, I would like the task to fail.  I thought this simply meant setting the "FailTaskIfReturnCodeIsNotSuccessValue" property to true, and setting the SuccessValue to 0.  However, this does not appear to work. 

Even with a simple batch file forcing the errorcode to 1 as follows, the task still completes "successfully".

SET ERRORLEVEL = 1

Any ideas?  Thanks!

View Replies !   View Related
Newbie Question - How Do I Specify A Variable For The File Location When Using The Execute Package Task
There are two options to specify the subpackage location (SQL Server or file location). I'd like to know how I can specify a variable name that points to the file location so I avoid hard coding the file location which could change during production installation.

View Replies !   View Related
Using XP_CmdShell To Execute BCP Utility With QUERYOUT. How To Control The OWNER Of The File Created?
I need the file created by my BCP QUERYOUT command I'm executing from XP_CmdShell in Transact-SQL to have a specific OWNER. I've tried using the sp_xp_cmdshell_proxy_account to setup the correct owner. The owner is always SERVERNAMEAdministrators.
 
thanks,
 
jim
 
 
 

 

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved