Showing posts with label runtime. Show all posts
Showing posts with label runtime. Show all posts

Thursday, March 29, 2012

Edit connection manager connection string at runtime with c#

This is the first time I have used SSIS, so please bear with the ignorance.

I have a super simple package that inserts x000's of rows into a temporary table. The data source is a file that the user will upload. I need to be able to tell the package what file to upload. I'm thinking the simplest thing would be to edit the connectionString property of the SourceConnectionFlatFile at runtime. Is this possible? What form should the file path be in (UNC, other)? And, are there any other considerations I should be aware of?

Thanks!

Package configurations were designed for just this purpose.

Monday, March 19, 2012

Dynamically pick the source and destination tables

I want to write a SSIS which picks up the source and destination tables at runtime is it possible. As we have a SSIS which is used to pull data from oracle but the source and destination table name changes.

If the metadata changes (that is the column names change and/or data types) then you cannot do this without manually accounting for the differences.

If the structures are the same, then you can build SQL statements to select against the appropriate table name. You can build the SQL in a variable expression.|||

Would you please give an example for this.

|||A little bit of searching will help you out...

I found: http://blogs.conchango.com/jamiethomson/archive/2005/12/09/2480.aspx|||

All the source tables have different data type and columns, so I think it is not possible to have 1 common SSIS for all of them.

We are storing our packages under the FileSystem on the server and executing them via jobs. So my question is if we make the changes in the package in BIDS(our Solution file) will it be reflected in the job or we'll have to import the package in File System?

|||

Paarul wrote:

All the source tables have different data type and columns, so I think it is not possible to have 1 common SSIS for all of them.

We are storing our packages under the FileSystem on the server and executing them via jobs. So my question is if we make the changes in the package in BIDS(our Solution file) will it be reflected in the job or we'll have to import the package in File System?

If you edit the package that's being referenced in the job, then the changes will be picked up on the next iteration.

Friday, March 9, 2012

Dynamically connecting crystal report to different database and server

I am using crystal report 7.0 & want to connect crystal report dynamically to different server and database during runtime. All these database / servers are having same structure / tables.
I am using the following code, but it is not working. I have to use the set location option and change server/database. But I want this to happen dynamically with any server/database names passed from vb front end.
Dim clsCR As New clsCrystalAPI
............
With clsCR
.Database = gstrDatabase
.Password = gstrPassword
.Server = gstrServer
............
End WithWhat is clsCrystalAPI, a custom wrapper for one of the Crystal APIs?

Anyway, one way could be to scroll thru all your tables and use SetLogonInfo on each table. If you also have subreports, you will have to locate them, open, and apply SetLogonInfo to the tables.

Dynamically changing Web Service Task parameters at runtime?...

Okay, this one might stump you guys.

I am trying to access a web service that has parameters (three of them, all strings). But I want to access this service repeatedly, and drive the thing from a table.

I've got the Foreach Loop correctly getting variables from the recordset I populate from the table. That works and I can run a script with msgbox showing all the correct values being read from the table.

My problem is taking these variables and sticking them in the Name / Type / Value entries in the Input tab of the Web Service Task. There doesn't seem to be any mechanism for dynamically updating these at runtime, and if there isn't, that is a HUGE hole in the product. Who accesses Web Services with the same parameters every time?!?
No doubt you know this by now Lazamataz but this can't be done. you're right, it IS a hole in the product!

-Jamie|||

I'm trying to do this to...

Is there a way of accessing web service parameters through a script and the runtime / tasks?

|||

Absolutely, yes. Buy Donald Farmer's book (available at the usual places). That has a downloadable chapter that shows you how.

-Jamie

Dynamically changing Web Service Task parameters at runtime?...

Okay, this one might stump you guys.

I am trying to access a web service that has parameters (three of them, all strings). But I want to access this service repeatedly, and drive the thing from a table.

I've got the Foreach Loop correctly getting variables from the recordset I populate from the table. That works and I can run a script with msgbox showing all the correct values being read from the table.

My problem is taking these variables and sticking them in the Name / Type / Value entries in the Input tab of the Web Service Task. There doesn't seem to be any mechanism for dynamically updating these at runtime, and if there isn't, that is a HUGE hole in the product. Who accesses Web Services with the same parameters every time?!?
No doubt you know this by now Lazamataz but this can't be done. you're right, it IS a hole in the product!

-Jamie|||

I'm trying to do this to...

Is there a way of accessing web service parameters through a script and the runtime / tasks?

|||

Absolutely, yes. Buy Donald Farmer's book (available at the usual places). That has a downloadable chapter that shows you how.

-Jamie

Dynamically changing reports at runtime

Hi - I'm trying to decide among reporting options without spending too much
time going down the wrong path, so I hope someone can answer my questions
about Reporting Services capabilities...
With Reporting Services, can I dynamically (at runtime via code):
1) add or remove subreports from a report?
2) make a subreport visible or hidden?
3) add or delete columns?
4) make columns visible or hidden?
5) add or delete tables?
6) make a table visible or hidden?
Is doing any of these things fairly straightforward?
Thanks so much in advance,
SherylYes, you can use an expression for the Hidden property of respective report
elements to dynamically show/hide them at runtime.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sheryl Landon" <shland@.comcast.net> wrote in message
news:OoDKy5$pEHA.3244@.tk2msftngp13.phx.gbl...
> Hi - I'm trying to decide among reporting options without spending too
much
> time going down the wrong path, so I hope someone can answer my questions
> about Reporting Services capabilities...
> With Reporting Services, can I dynamically (at runtime via code):
> 1) add or remove subreports from a report?
> 2) make a subreport visible or hidden?
> 3) add or delete columns?
> 4) make columns visible or hidden?
> 5) add or delete tables?
> 6) make a table visible or hidden?
> Is doing any of these things fairly straightforward?
> Thanks so much in advance,
> Sheryl
>

Friday, February 17, 2012

Dynamic SQL statement

Hi all
I want to create a report with dynamic select statement. Does matrix
supports to pass a select statement as a parameter at runtime? I am
wondering[could not understand few reviews] how the matrix will support to
add dynamic columns and rows at runtime. I will have fixed columns of 5 .
But my select statement might change by "where" condition at runtime.
Expecting an earliest suggestion.
Thanks in advance.The matrix can have dynamic columns means that depending
on what your dataset contains you can show a particular
number of columns.
I didnt exactly get what you mean by your SP needs to be
dynamic.
In your select statement you can change the where clause
(as you say) and depending on the result you get from the
SP execution you can make your report dynamic.
>--Original Message--
>Hi all
>I want to create a report with dynamic select statement.
Does matrix
>supports to pass a select statement as a parameter at
runtime? I am
>wondering[could not understand few reviews] how the
matrix will support to
>add dynamic columns and rows at runtime. I will have
fixed columns of 5 .
>But my select statement might change by "where" condition
at runtime.
>Expecting an earliest suggestion.
>Thanks in advance.
>.
>