Reading Variabels From DTSX==&&>Writing

Jul 20, 2007

Hi,



I want to make an application that fills in the variables into a dtsx package (ssis).

I'm able to read the variables created in the package



Application app = new Application();

Package p = app.LoadPackage(pkg, null);

Connections myConns = p.Connections;



foreach( Variable v in p.Variables){

Console.WriteLine(v.Name);

Console.WriteLine(v.Value);

Console.WriteLine(v.Namespace);

Console.WriteLine("/////////////////////");

Console.WriteLine("/////////////////////");

}

i'm also able to add on

Variable myVar = p.Variables.Add("amyCustomVar", false, "User", "3")



When the applications is closed the package does not contain the variable. So this is all done in memory.

Is their a way to actually write the variable into the physical package.

View 1 Replies


ADVERTISEMENT

Reading A .dtsx File's Package Configuration In VB.NET

Jan 10, 2008

So I've seen articles outlining how to execute a package in VB and how to pass variables along to the package, which is great.

But I'm wanting write a VB.NET app that will read the xml in a .dtsx package, looking for the available variables (and datatypes) that need to be passed to the package to configure it properly. Anyone done this? Is it best to use parent package variables? Or another type of configuration?

When looking at the xml of a .dtsx file, I can see a variables section that could be parsed... is there anything letting me know what is required versus optional? How do I know the datatype that I need to pass? Any help would be appreciated...

View 22 Replies View Related

Reading And Writing To Same Table

Feb 16, 2008

I need to select all the records in a table, loop through them one by one, calculating some new field data, and then write the new data back to the same table. Here is the basic structure of what I've come up with:<CODE>SqlCmd = SqlConn.CreateCommandSqlStatement = "SELECT ProductID, Name FROM tblProducts"SqlCmd.CommandText = SqlStatementSqlRdr = SqlCmd.ExecuteReaderIf SqlRdr.HasRows Then  While SqlRdr.Read    If SqlRdr.FieldCount > 0 Then      ...      SqlWriteCmd = SqlConn.CreateCommand      SqlStatement = "UPDATE tblProducts SET Name = '" & NewName & "' WHERE ProductID = " & CStr(ProductID)      SqlWriteCmd.CommandText = SqlStatement      SqlWriteCmd.ExecuteNonQuery()      SqlWriteCmd = Nothing    End If  End WhileEnd IfSqlRdr.Close()SqlCmd = Nothing </CODE>I get an error that tells me to close out the Reader before trying to execute the write query. But I can't close it out for the loop to work properly. So I assume that there must be another way to do this simple task, but I'm so new to all of this that I need some help! Thanks! 

View 1 Replies View Related

Reading And Writing To Databases

Jun 13, 2007

I am new to database programming. What I want to do is have a database on a clients PC to use as data storage. This program will connect to a program running on our server (via TCP) which will store this information in another database. The clients database will only be accessed by my program - so I think that I don't need to register it with SQLEXPRESS. The servers database will probably need to be so another program can access it.

The problem I was having was writing and reading to a database that I created inside Visual Studio 2005. As I see it, there could be three issues - reading, writing, or setup of the database. To find out this issue I downloaded the Northwind database. The code below returns column 0 row 0 of the Customers table.




Code Snippet

NORTHWNDDataSet northwindDataSet = new NORTHWNDDataSet();

NORTHWNDDataSetTableAdapters.CustomersTableAdapter customersTableAdapter = new NORTHWNDDataSetTableAdapters.CustomersTableAdapter();

customersTableAdapter.Fill(northwindDataSet.Customers);



string data = (string)northwindDataSet.Customers.Rows[0].ItemArray[0];
Console.WriteLine("COL 0 - ROW 0: " + data);

This code returns "ALFKI". Which is what is in col 0 row 0 (This can be checked by right clicking on the Customers table in NorthWNDdataset.xsd and selecting preview data).

Next is writing. This is where I have the issues. The method below is one way that I tryed.




Code Snippet

DataRow row = northwindDataSet.Customers.NewRow();
row[0] = "1";
row[1] = "2";
row[2] = "3";
row[3] = "4";
row[4] = "5";
row[5] = "6";
row[6] = "7";
row[7] = "8";
row[8] = "9";
row[9] = "10";
row[10] = "11";
northwindDataSet.Customers.Rows.Add(row);

try
{ customersTableAdapter.Update(northwindDataSet.Customers);//table);
northwindDataSet.AcceptChanges();
MessageBox.Show("Update worked");
}
catch
{
MessageBox.Show("Update do not work!");
}

The messagebox shows "Update worked" - yet the data did not get added.

Thanks in advance.

Using:
Visual Studio 2005
C#
SQL Server Management Studio Express

View 3 Replies View Related

Reading / Writing Binary Data To Db

Sep 9, 2004

I'm trying to read a byte array of an image datatype from sql server, and then to put this in another field in the database. I get a byte array, but somehow the image doesn't get into the db well with the sql parameters. Does anyone have an idea how to tackle this problem?

Thanks a lot, Hugo

View 2 Replies View Related

Reading Or Writing A File To A SQL Database

Nov 22, 2004

Halo, I am a bit new to this
Please can someone help me, I would like to write a file(Any type) to a SQL database like a attached document(s) for the current record and be able to detatch the document when needed.
I use VB.NET for a ASP.NET app.
I basicly would like to attach documents to a piece of equipment may it be any kind and if the user views the equipment he will be able to detatch the documents for that piece of equipment and open it with the correct software.
PLEASE HELP!!!!!!!

View 1 Replies View Related

Reading And Writing Same Variable To A Script

Apr 27, 2006

It looks like its not possible to both read and write the same variable from a script using the conventional Me.Variables.<variable> syntax.

I can only assign a variable as Readonly or ReadWrite and not both. If I assign it ReadOnly I can only access it in the PreExecute subroutine. If I assign it ReadWrite I can only access it in the PostExecute subroutine (in fact doesn't this just make it WriteOnly in fact?). So I can only either read in or read out a variable using this syntax, noth both. Is this right?

So the read and write a variable to a script, the VariableDispenser approach is the only option to use. Is this right? and is it documented somewhere that this is how to use variables in scripts. Thanks.

View 13 Replies View Related

Reading/Writing Data From A SQL Database

Feb 14, 2008



Hi,
I have a data structure called 'Quote' which contains a number of different variables and controls ranging from text boxes, check boxes and radio buttons, i need to be able to read and write this from a database.

First I think a description of my overall project is needed:



Project Description
I have been given a brief that basically says: i have to create a programmed solution in VB to solve a problem. This problem can be anything we like, and I personally have chosen to create a program that manages quotes for building Log Cabins (this is very contrived and far from anything someone would do in the real world).

My solution will allow a generic user to create a quote (using a form with controls such as text boxes, check boxes, radio buttons) , and then save this to file. These users may then wish to load/edit this quote at a later date, from another form.

Whilst completing this project, i'll only have up to about 5 records (quotes) within the system, so i dont need the ability to store hundreds of records. And each record will be relatively short, with only about 10-15 data items within the data structure.

Also the Admin (or business owner in this case) need to be able to view all saved quotes in a presentable format, and edit them if needs be, from within this same program.

This solution does not need to be absolutely perfect and 100% efficiently coded, or have all the bells and whistles a real-world program would have. This is for an A level computing project by the way.





So basically, i need to be able to read from the database (to populate a Data Grid (i imagine this is best way?)) and so Admin can access any quote and edit it (editing is not vital, but viewing/printing is. Maybe i should stop at just viewing any quote?). Also i need generic users to be able to fill in the Edit Quote form and then save this data into the database.

And is a data structure really required for me to use a database?

I've never used databases in VB before (but have used them elsewhere, mainly Access) and so am completely new to this. Any help will be much appreciated.
Thanks

View 13 Replies View Related

Reading And Writing To Flat File

Apr 27, 2006

I'm doing a test package which reads a flat file, makes an adjustment using the derived column task and writes to the same flat file. But, the read locks the flat file, so the write can't access it. Any ideas for a resolution?

Thanks,
Dave

View 2 Replies View Related

Reading/writing Files To Network Drive

Mar 20, 2007

We have a package that is using a ForEach loop container to access files on a network drive. For some reason I am getting a message that the ForEach enumerator is empty and did not find any files that matched the pattern. For the pattern I left the default *.* for testing purposes. I have specified the file folder as \remoteserverfilesharesubfolder and also as \remoteserverc$filesharesubfolder and have gotten the same message. However when I map a network drive and set the file folder to the network drive it finds the files. Is this a permissions issue?

After I finish processing the file I want to move it to a new directory. Once this is deployed in production, the package will not be running under a domain account and probably won't have access to the network folder. Is there any way to specifiy in the connection manager itself that it should use a specific account to access the folder?



TIA,

Sabrina

View 1 Replies View Related

DTSX Package Calling Another DTSX Package Question

Jun 13, 2007

I have a dtsx package that is calling another dtsx package, however, if the called upon dtsx package fails with errors or what not, then the calling package does not continue as well. Is there any way to override this such that if the called upon package fails, the downstream actions in that package can stop, but the calling packages downstream actions to continue?

View 3 Replies View Related

DTSX On 64x

Jun 17, 2008

Hi people.
I just run a new instance of a SQL 2005 64x in my network.
For now all is working right. I have only one problem.

I create a procedure for BI that use DTSX.
Sometime if i try to use from Integration services, these job start and immediatly stop without no error.

Someone can help me ?

thank you in advance.

View 3 Replies View Related

Script For Dtsx

Jan 15, 2007

Hi all,

i have creatd a dtsx packages, i need to script on that packages.

is it possible to get a script on that corresponding packages..?

Can any one able to help me..?

Thanks
krishnakumar.C

View 3 Replies View Related

Failing A DTSX

Dec 27, 2007

I have been trying in vain to get a DTSX to return to a vb.net application that it has failed, all i get back is a

ReturnResult = success.

In the dtsx is the following;

Secquence

- Transaction Option set to Required
- FailParentonFaluire set to True
- FailPackageonFaluire set to True
- MaximumErrorCount set to 0

Inside the sequence Container
DataFlowTask
- Transaction Option set to Required
- FailParentonFaluire set to True
- FailPackageonFaluire set to True
- MaximumErrorCount set to 0

ExecuteSQLTask
- Transaction Option set to Required
- FailParentonFaluire set to True
- FailPackageonFaluire set to True
- MaximumErrorCount set to 0


I have run the package from my vb.net application and it runs fine, importing data from a file. I tried running it with a bogus file name that doesnt exsist and it still returned a ReturnResult = success. I need it to return a failed result on any errors, which is what i thought it would do as i have it sey to fail the package on errors throughout each task ... am i missing something ?

View 3 Replies View Related

XML Stylesheet Available For .dtsx ?

Nov 9, 2006

I am having more luck editing the dtsx files directly than using configs. Also for documentation purposes this would be helpful as I don't know enough about xml to find or build a tool to create a style sheet for me.

Thanks!

Ken

View 3 Replies View Related

I Can't Open My Dtsx

Aug 9, 2006

Hi everyone,

After a while I'm come back to SSIS but a drawback appears.

I€™ve copied from our server a folder which contains a few dtsx on my local folder and when I€™m going to open dtproj and then choose any of them:

Error 1 Error loading 'M_Hac_Modelo187.dtsx' : Error al recuperar un generador de clases COM para el componente con CLSID {E80FE1DB-D1AA-4D6B-BA7E-040D424A925C} debido al siguiente error: 8000401a.. c:ssishacienda_anualM_Hac_Modelo187.dtsx 1 1
..
..
..

(I think that is not necessary to translate into english due to simpleness of the message.)

What the hell is happening? I perfectly remember have been doing the same a month ago and I was able to open them without problems.

TIA

View 2 Replies View Related

Run A Dtsx Package In 32-bit

Dec 8, 2006

Hi!

I have a  SSIS-package with Excel Connection Manager that fails on our x64-platform with error:
Error: 2006-12-08 06:46:23.77
Code: 0xC0202009
Source: dpd2_philips Connection manager "Excel Connection Manager"
Description: An OLE DB error has occurred. Error code: 0x80040154.
An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
End Error
Error: 2006-12-08 06:46:23.77
Code: 0xC020801C
Source: Copy Data from Blad1$ to dpd2 dbo philips Task Excel Source [107]
Description: The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.
End Error

It's works fine on my computer (x86) and if I start the package manually on the x64-server. But I noticed that it runs under 32bit (DTExecUI.exe *32 in taskmanager) when it's started manually.

Any idea? The server use dtexec.exe to start the packages. Maybe it runs under 64bit then? 

View 4 Replies View Related

DTS Packages (.dtsx) And Automation Through C#

Jul 23, 2007

I have spent the last couple of weeks going through about 15-20 different examples/tutorials on running DTS packages from inside a C# Windows app (and even asp.net). I must have a mental block, because I can't seem to make it click in my head. I have hundreds of DTS packages saved as .dtsx files. I can double click on them and run them perfectly. What I need to do is be able to run them conditionally from inside a windows app. Could anyone point me to a tutorial or example that could help me with this? I've even looked at some VB source to see if I could work it out, but I keep running up against a wall. I'd appreciate any help anyone can provide.

View 1 Replies View Related

Schedule A Packge.dtsx

Jun 24, 2008

Hello,
Please, help me.. I'm trying to execute a packge.dtsx that be save in folder. How can i do, to execute it? I create a job, but always give me errors..

View 9 Replies View Related

How To Debug DTSX Packages?

Aug 1, 2007

I have some familiarity with DTS packages, and find them easy ( generally) to debug as you can run them step by step and simply find the offending step. when they fail they also put a message box with the error in the centre of the screen. My system has recently been updated and now uses DTSX packages. I can open and veiw these in visual studio, but i cannot run them one step at a time, and they dont give a nice error message when they fail. how do you debug a DTSX package, or at least make debugging it a little easier?

View 7 Replies View Related

The Never Ending DTSX Package

May 23, 2006

Hi Champs

I want to implement a rutine that watches for specific files in a specified folder.

I've found the WMI sample "File Watcher Task" for SSIS and it looks fine.

My question is now: how shall I run this package; shall I start it at let it run forever?

And also how do I monitor that the package is running?





Many thanks

Rogvi

View 2 Replies View Related

Is Importing A Dtsx File Necessary

Aug 15, 2007

Ok, I'm actually adding a SSIS job to my job agent on my test SQL server. Noticed that when I go to my job agent --> add new job, under the steps option, I click new. this then takes me to the new job step window. When I select

Type as SQL Server Integrated Services, I then see some new tabs at the bottom of the form. Under package source I can select File System, SQL Server, or SSIS Package Store, then I have to select the location of the dtsx file.

So my question is, since I can select the actual file (package) I want to run from here, do I really have to import a package to the file system or MSDB under the SQL Integration Services on the server?

It appears to me that its kind of the same thing.










I'm new to this SSIS, SQL DB work, so I'm learning as I go. . . .

View 1 Replies View Related

CAn't Run DTSX From Visual Studio

Aug 30, 2006

I can create and edit DTSX packages in Visual Studio 2005, but I can't execute them because the start button is grayed out. Can someone help?

I am able to run them using the execution utility, but that's a hassle.



Kathy

View 1 Replies View Related

Importing Dtsx In SQL Server

May 22, 2008



I created a dtsx with my user account and when I had imported it in SQL server
I get the following error when trying to execute:



Executed as user TESTGISSYSTEM Failed to decrypt protected XML node, Key not vallid for use in specified state.

Even when I remove the password for the dtsx I still get the same error.


I saw the reply's on this
Re: DTSX package will not run from SQL server agent
Thread Starter: jschroeder Started: 13 Aug 2007 10:08 PM Replies: 2
but it was no solution for my problem.

Thx

View 4 Replies View Related

DTSX From Deployed Packages

Dec 14, 2007

Hi,

I want to take the backup of all SSIS packages deployed in the SQL server. I need the backup in DTSX format, how should i do that. Please advice.

View 8 Replies View Related

RSExecutionLog_Update.dtsx Error!!

Feb 8, 2006

Hi,

When I execute the RSExecutionLog_Update.dtsx, I get an error saying "The task "Set Time period" cannot run on this edition of Integration Services. It requires higher level edition". I am using the Proffesional Edition of SQL2005 and the Integration Services Version is 9.00.1399.00. I have configured the target database RSExecutionLog correctly. Wat could be the problem?

TIA

View 4 Replies View Related

Dtsx Package Encryption

Oct 19, 2007

I understand that I can use dtutil to provide a password to encrypt the package. However, when I run the encrypted package, I need to provide the same password in order to run it. Is there a way that I can encrypt the package but allow anybody to run it without providing the password?
That is, I want the package to be encrypted so that nobody can load and modify the code in Visual Studio, but I want people to be able to execute it. Is there a way to do this? Similar to generating a exe file?

View 7 Replies View Related

Dtsx With Config File?

Feb 15, 2006

Hi all

This is the situation: I've a dtsx package wich creates a tab delimited txt file from a sql server 2005 databasetable. Now this all works just fine. But what I want to do is that the user can choose the destination path of that created txt-file. Right now I've declared the path when I created the flat file source.

On the net I found that a config file for a dts package (sql server 2000 - Dynamic Property Task) could do the trick...

Any help plz?

thx!

View 1 Replies View Related

Unable To Run .dtsx Package

Mar 28, 2007

Dear all,



SSIS package created from the wizard couldn't be run from the visual studio editor? The run button is disabled. Is it not possible to run from inside editor as well?



Many thanks,

milan

View 3 Replies View Related

How Do I Obtain The Log File For A DTSX?

Aug 16, 2006

Hi everyone,

I'm stuck with this silly thing but I haven't idea how to obtain the path for the log file specified in a SSIS package programatically.

This snippet of code works fine:

Dim pkg As New Microsoft.SqlServer.Dts.Runtime.Package

Dim app As New Microsoft.SqlServer.Dts.Runtime.Application

Dim pkgResults As DTSExecResult

pkgLocation = "C:Documents and Settings40990880Mis documentosVisual Studio 2005ProjectsProyecto de SSIS3Proyecto de SSIS3ProvaPrimera.dtsx"

pkg = app.LoadPackage(pkgLocation, Nothing)

pkgResults = pkg.Execute()



After execution I'd like to see the log file which is allocated in the same place than DTSX file. But how??

Using pkg.LogProviders.Item(0).Name appears description reference "SSIS log provider for Text files1" but no the name of the file or its path



Thanks in advance for any thought or advice,





View 6 Replies View Related

Post Dtsx Packages To Forum

Mar 30, 2007

First off, can you post .dtsx packages to the forum? I always end up cutting and pasting code, which is by is nature incomplete, as it generally has external dependencies (connections, variables).

Perhaps you cannot do so for security reasons?

Second, is there a good blog site that allows you to post .dtsx packages?

I'd rather post .dtsx links than cut and paste code (which half the time formats the code un-recognizably), or even worse, post package xml, which contains the layout information and possibly IL that makes it all but unreadable.

View 4 Replies View Related

Calling Dtsx Package Using Xp_cmdshell

Jan 17, 2008

am trying to execute a dtsx package using xp_cmdshell

when testing, this works fine

DECLARE @returncode int

EXEC @returncode = master..xp_cmdshell 'dtexec /f "C:WorkWarehouseDev.ETLLoadGroup_Daily.dtsx"'

PRINT @returncode

then change it to look at the live one

DECLARE @returncode int

EXEC @returncode = master..xp_cmdshell 'dtexec /f "C:WorkWarehouse.ETLLoadGroup_Daily.dtsx"'

PRINT @returncode


doesnt work - it tries to execute the WarehouseDev version

any ideas ??

n.b. didnt know if this should be in this forum or a t-sql forum - apologies if its in wrong place !!

View 4 Replies View Related

Can't Load SSIS Dtsx Package

Apr 4, 2007

hi there,

when i start SQL Server business intelligence developer and create new Integration Service project, i will see following error:



Error loading 'Package.dtsx' : Object reference not set to an instance of an object.. C:SairiMy DocumentsVisual Studio 2005ProjectsIntegration Services Project12Integration Services Project12Package.dtsx



this error occures just on my PC and i reinstalled VS2005 and SQL2005 again and unfotunately the problem existes.


please someone helps me (just don't tell me to format my PC!!!)



tnx

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved