DTS - Updating DataSource Connection Via ActiveX Script Task

Jul 6, 2001

Hi,

I've written a DTS Package to pull information from a number of servers. I have a list of servers (Source Servers) and for each one I automatically update the Datasource property of the Source Server connection using vbscript in an ActiveX Script task and a global variable.

I have a transformation that occurs between the Source server and Target server.

As I process each Source Server in turn, the global variable gets set correctly and so does the Datasource property of the Source Server connection. However the transformation still runs against the first Source Server that was processed.

Looking at BOL it appears that a transformation stays connected even after it has finished. Therefore I assume that although I change the Datasource of the connection to a new server, it still runs against the first server that was used.

My question is how do I get the connection to run against the updated Datasource, i.e. do I need to do a refresh of the Connection, disconnect or what ?

Any ideas would be much appreciated.

thanks

View 2 Replies


ADVERTISEMENT

Sql Datasource Not Updating

Mar 6, 2007

I have this web store that I have been creating.  When a customer goes to check out, he has to log in, then he is redirected to a page where he can view/add/or edit shipping and billing address.  I have based all the sql statements on the profile username, adding records and retrieving them works just fine.  When I go to change something in the info it uses an sql statement that updates based on "Where AccountUserName = @AccountUserName", I have @AccountUserName set to Profile("Username").  Keep in mind this works fine for adding new or bring up current records.  I even put in code in the updated event for the sql data source to post a msgbox telling me how many rows were affected, it says 1 even though I dont see any change in the data.   What am I doing wrong here, it's driving me nuts, its just a very simple update. 

View 2 Replies View Related

Help Using VBScript In An ActiveX Task In DTS Package

Jan 16, 2004

Hi,

Thanks for reading.

I am creating a DTS package to import a .txt file into sql. I have everything in place, but the text file needs to have the last record deleted before the import. I need help with this part

I would like to delete the last record from a fixed width text file before I import it into sql. The number of rows will vary from file to file.

Can any one offer suggestions on the best way to do this.

I understand that I have to use the FSO to open and read the file, but I am not sure the best way to proceed after that.

Thanks in advance,
Steve

View 1 Replies View Related

DTS ActiveX Script Task..vanished

Feb 9, 2004

I have no idea what's going on.. but when I open the SQL DTS designer.. there's no ActiveX Script task on the left toolbar anymore. It used to be there. How do I get it back?? I remember playing around with some dts dll files on my machine... maybe I did something that made it go away (note: the DB server is not on my machine.. I just run Enterprise Manager on my machine to access it). Should I reinstall Enterprise Manager?

View 1 Replies View Related

ActiveX Script Task - SSIS

Apr 3, 2006

Within a SQL 2000 DTS Package I have an ActiveX Script that would go within my transform tasks and update the queries by concatenating a "Where" clause with a date from a database table. This way I could keep track of when the last time I updated the table so that I could only bring down the rows since the last run. How can this be done within SSIS? I've been looking and I'm getting confused. Any help would be greatly appreciated.

View 2 Replies View Related

ActiveX Script Task] Error:

Jan 27, 2006

Hi,
 I'm trying to reset the below  Global varialbe in SSIS - Activex script.

Function Main()
DTSGlobalVariables("GxvFilename").value =null
Main = DTSTaskExecResult_Success
End Function

Getting the below  Error when executing the package.

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x060339E4


Please provide me solution for this.

Thanks,

 

 

View 2 Replies View Related

Reconcile ADO Dataset From ActiveX Script Task

May 12, 2006

I'm having a bear of a time with this. I have a recordset that pulls data from one, single table. I would like to iterate through the set, do some processing based on that data, then delete all of the records in that recordset.

I'm trying to do something like the following:


Set dbConn = CreateObject("ADODB.Connection")
Set dbRS = CreateObject("ADODB.Recordset")

dbConn.Open("myConnectString")
dbRS.open dbSQLCmdText, dbConn, 2, 4

While Not dbRS.EOF
Do some stuff
dbRS.Delete
Wend

dbRS.BatchUpdate

dbRS.Close
dbConn.Close


I get an error stating:

"Multiple-Step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."

This seems to indicate the connection doesn't think it's capable of reconciling the recordset. Is there a way to do this in one batch or should I stick with executing a single delete statement for every record in my recordset?

View 2 Replies View Related

Calling Stored Procedure From An ActiveX Task

Jun 6, 2006

I'm attempting to call a storedprocedure from within an ActiveX task ina DTS and am getting a "Command Text was not set for the commandobject" error. I have no problem if I replace the stored procedure callwith the actual SQL.Is it possible to directly call a SP via an ActiveX task? If yes, couldsomebody help me with the syntax please?This is what I have currently haveSet Conn = CreateObject("ADODB.Connection")SQL = "exec (MySP)"set RLoop=conn.Execute(SQL)do while (NOT RLoop.EOF)msgbox RLoop(1)RLoop.MoveNextLoopTIAKarthik

View 1 Replies View Related

Can You Reference A Package Using ActiveX Script Task?

Aug 23, 2007



Using ActiveX Script Task it is possible create office automation objects such as Word and Excel typically using the CreateObject() Syntax. Can you use this syntax to create a Package object using CreateObject("DTS.Package")? If not Why not? I am not sure whether it was possible in DTS.

I am aware of the fact that ActuveX Script Task is included in this Version of SSIS and will be deprecated.

View 2 Replies View Related

ActiveX Script Task/Function Not Found

Jul 3, 2006

We have a SQL Server 2005 Cluster that we are trying to send email from to notify when certain jobs have completed, failed, etc. We are having a bit of a problem getting the email to work and I believe that the failure is at the SMTP server, not at the SQL level.

That being said, I'm trying to create a simple SSIS package that I can use to test connectivity to the SMTP server with and send email. I've added an ActiveX Script Task that calls a COM object that actually sends the email. I keep getting a "Function not found." error when I try to execute the package, and I have no idea why I'm getting that. It says that the errors were found during validation.

Can anyone help?

View 3 Replies View Related

Using DTS Connection Obj In ActiveX Script. HELP

Sep 1, 2005

hey guys
i have a code that looks something like this
set mySourceConn = CreateObject("ADODB.Connection")
mySourceConn.Open = "Provider=SQLOLEDB;Server=(local);Database=server_name;User Id=sa;Password=saPWD"
 
this works fine but the problem that i'm having is we do not want to hard code the password in the connection string.
so i was wondering if there is anyway to access the DTS Connection object from the ActiveX. i was able to get the object but it is in connection2 datatype and i am not familiar of using this datatype. Code below returned the connection2 object
'DTS_Conn is the name of the object i specified in the DTS'DTS_Conn --> SQL Server Connection objectDTSGlobalVariables.Parent.Connections("DTS_Conn")
can i use this connection2 object to run the sql statement and get the recordset?

View 1 Replies View Related

Debugging And ActiveX Script Task In A DTS Package Running On SQL Server 2005

Sep 13, 2006

I have a DTS package that I brought over from SQL server 2000 in to SQL Server 2005. I have installed all of the legacy components to run the DTS packages but I need to debug an ActiveX script task. In SQL Server 2000 I could turn on Just-In-Time debugging and use the stop operator (in my vbscript) to break the running script and launch the debugger.

I don't see how to do this in SQL Server 2005 Management Studio. Is it possible to debug a script object in a DTS package running in SQL Server 2005?



Jay Abbott

View 1 Replies View Related

How To Retrieve Global Variables In An ActiveX Script Task Using VBScript In SSIS

Oct 27, 2006

I need to retrieve the Global Variables set in my package configuration file within an ActiveX Script Task within an SSIS package. In DTS, I could access the Global Variables to execute a SQLXMLBulkLoad for the following statement:

==========================================

Function Main()

Response.Expires=-1

set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
objBL.ConnectionString =
"provider=SQLOLEDB.1;server=ABC123;database=MyDB;Trusted_Connection=Yes;"
objBL.KeepIdentity = False
objBL.CheckConstraints = False

objBL.Execute DTSGlobalVariables("gv_XSDSchemaFile").Value, DTSGlobalVariables("gv_XMLFullPath").Value

Main = DTSTaskExecResult_Success
set objBL=Nothing

End Function
=========================================

I have tried using the Script Task to write this in VB.NET, however the MSXML4.0 is not exposed within the limited object model of the Script Task Designer. I have written a Data Flow Object using the XML Source, however it requires quite a bit of effort to have the Data Flow Component parse the XML (with 10 hierarchical nodes), transform each and provide a SQL Server Destination. This works, however the XML Source Component requires a hardcoded reference to the XSD Schema file and does not allow for a Global Variable to used. (They do provide this functionality for the XML file source though).

My requirement is to allow for the Global Variable to be passed for the Schema file at runtime. The only way I can think of is to recreate what I was doing in DTS where I could simply pull in the XML and XSD Global Variables and execute the SQLXMLBulkLoad in VB Script.

Any ideas on how to write this in VBScript within the ActiveX Script Task in SSIS?...

Michael

View 1 Replies View Related

DTS - How To Make ActiveX Script Open A Connection In The Diagram?

Feb 5, 2004

I have a simple question but I'm having a really hard time finding an answer.

Let's say I'm designing a DTS package, and I have a connection to a SQL Server called ConnSQL. How do I reference this connection in my ActiveX script? (so I can run SQL queries and such)

Thanks

View 1 Replies View Related

Cannot Set Connection Property Of Backup Database Task If Connection String Is Customized In Connection Object

Aug 23, 2006

I added a connection (ADO.NET) object by name testCon in the connection manager - I wanted to programmatically supply the connection string. So I used the "Expressions" property of the connection object and set the connectionstring to one DTS variable. The idea is to supply the connection string value to the variable - so that the connection object uses my connection string.

Then I added a "Backup Database Task" to my package with the name BkpTask. Now whenever I try to set the connection property of BkpTask to the testCon connection object, by typing testCon, it automatically gets cleared. I am not able to set the connection value.

Then after spending several hours I found that this is because I have customized the connection string in testCon. If I don't customize the connection string, I am able to enter the "testCon" value in the connection property of the BkpTask.

Is this an intrinsic issue?

View 2 Replies View Related

Datasource Connection Error

Sep 26, 2007

have developed a report on a test server which I can access from i./e. http://localhost/reports

DataSourcce is accessed using a sql login

My colleague on his machine can not access. His error is:

An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'MarketAnalytics'. (rsErrorOpeningConnection)
For more information about this error navigate to the report server on the local server machine, or enable remote errors

View 2 Replies View Related

Problem With The Connection To The Datasource

Apr 30, 2008

Hi everyone,

I have one problem with my reports. I have one Cube and every week, we process the cube to recalculate the measures.
Before, my report can be displayed with any problem but know, since we process the cube, we can't see the reports based on the cube.
The errors display in the report manager are :
rsProcessingAborted and
rsErrorOpeningConnection.

When i try to access the report directly from my local project thanks to visual studio, the reports works well.









I think that it may be a problem of rights and abilitations. Or maybe it'a an IIS problem ? Or a firewall problem ?







Thanks for your response.

Shaouk.

View 2 Replies View Related

Nonstop Datasource Connection

Oct 13, 2006

Does anyone out there have any ideas on the best way to connect in integration services to a nonstop sql database running on a tandem computer? We have some odbc drivers that have proven to be problematic and slow to use. What oledb products I can find apparently come with something that's around $36K per processor to buy. Thanks.

View 1 Replies View Related

Configuring The Connection (DataSource) Dynamically

Feb 6, 2008



Hi All,
I need to write a report which will run based on the user's input for Server Group. Meaning, if the user wants the report to be run for one say, UAT group, the report (and therefore the stored procedure) should be executed against UAT server. Or, if the user wants it to be run on the Production machine, the stored procedure should be executed on the Production Server. Assume that both UAT and Production servers are in the same domain to rule out any authentication issue.

I think one way of doing it is to create a linked server on one server which we use to connect via the Report Manager. So, whatever Server Group is selected based on that the SP will be executed on that respective Server Group's Server, since in the query we will have given full names of the tables that we use.

But, I strongly suspect, that having linked servers will not be accepted since it requires that the server owners maintain that. So, I was thinking if there is any other way of achieving this. If anyone knows, please help me with this.

Thanks a lot and let me know if the question is not clearly stated.

Manoj.

View 1 Replies View Related

Cannot Create A Connection To The Datasource 'DataSource1'

Jan 23, 2007

Hello, I Created a report with reportbuilder, after clicking on Run Report I got this message, Its very strange it seems that its trying to generate or create a datasource.



Para obtener más información acerca de este error, vaya al servidor de informes en el equipo del servidor local o habilite los errores remotos
----------------------------
No se puede crear una conexión al origen de datos 'dataSource1'.
----------------------------
Error al procesar el informe.



View 1 Replies View Related

Query Timeouts When Updating A Record Retrieved Through A Websphere JDBC Datasource - Possible Record Locking Problem

Apr 7, 2008

Hi,

We're running a Sage CRM install with a SQL Server 2000 database at the back end. We're using the Sage web services API for updating data and a JDBC connection to retrieve data as it's so much quicker.

If I retrieve a record using the JDBC connection and then try and update the same record through the web services, the query times out as if the record is locked for updates. Has anyone experienced anything similar or know what I'm doing wrong? If I just use DriverManager.getConnection() to establish the connection instead of the datasource, and then continue with the same code I don't get these record locking problems. Please find more details below.

Thanks,
Sarah

The JDBC provider for the datasource is a WebSphere embedded ConnectJDBC for SQL Server DataSource, using an implementation type of 'connection pool datasource'. We are using a container managed J2C authentication alias for logging on.

This is running on a Websphere Application Server v6.1.

Code snippet - getting the record thru JDBC:


DataSource wsDataSource = serviceLocator.getDataSource("jdbc/dsSQLServer");
Connection wsCon = wsDataSource.getConnection();


// wsCon.setAutoCommit(false); //have tried with and without this flag - same results

Statements stmt = wsCon.createStatement();


String sql = "SELECT * FROM Person where personID = 12345";
ResultSet rs = stmt.executeQuery(sql);


if(rs.next()){
System.out.println(rs.getString("lastName"));
}

if (rs != null){
rs.close();
}
if (stmt != null) {

stmt.close();
}
if (wsCon != null) {

wsCon.close();
}

View 1 Replies View Related

SSRS Cannot Create A Connection To Datasource Error

Sep 26, 2007

Hai All..

I have develop any report in reporting services on server Development. i deploy my report to server production.
i have connection to cube as data source. if open report manager in server production and open the report, its succesfully. the report is open. but if i open report manager in server development show error



An error has occurred during report processing. (rsProcessingAborted)

Cannot create a connection to data source 'PNL'. (rsErrorOpeningConnection)

For more information about this error navigate to the report server on the local server machine
i use windows authentication in my pnl datasource.

thanks

Yudhi

View 2 Replies View Related

[ActiveX Script Task] Error: Retrieving The File Name For A Component Failed With Error Code 0x001B6438.

Jul 28, 2006

This error occurs when the ActiveX task tries to execute:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.

Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.







View 8 Replies View Related

How To Create A Datasource Which Connection Type Is SQL Server Anlysis Service In Rss Script?

Oct 20, 2005

I am making a rss script to deploy the reports and datasources.

View 2 Replies View Related

Problem Updating A Custom Task

May 24, 2007

I've created a custom task, and now I want to upgrade it. There's actually no change in the task itself, but I've changed the assembly version number, and now I need to upgrade all the tasks that reference the old version number.

So I rebuilt the task, and I created a policy assembly with a bindingRedirect that forwards to my new assembly. I removed the old version of the assembly from the GAC. All good so far - I've even run the task through the debugger, I open the package as "Reload with Upgrade", and the breakpoints in my CanUpdate, Update and Version overrides are being hit fine. This approach works fine in my custom pipeline components, and the PerformUpgrade override updates the UserComponentTypeName to reflect the new assembly version number (see Milen's post in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=893641&SiteID=1).

But the task itself won't upgrade, or at least, it seems to require the old assembly version number. I get an error message:




Code SnippetThe task with the name "My Task" and the creation name "xx.xxx.MyTask, xxx.xxx, Version=0.1.0.0, Culture=neutral, PublicKeyToken=xxxx" is not registered for use on this computer.



Has anyone got any ideas what I'm doing wrong? I've got 40 or so packages with 2 tasks in each, and I don't really want to have to delete and add them to each one ...

View 2 Replies View Related

Script Task Not Updating Package Variable

May 3, 2006

I am trying to update a package variable. The package consists only of a script task and a package user variable. I have included the variable, myVar (scope: package; type: string), in the ReadWriteVariables property of the script task.

The only code I have used, in Public Sub Main, is:

Dts.Variables("myVar").Value = "2"

The package runs successfully but the variable does not change. I thought that maybe the underlying value really does change even though the value as seen in the package variables window does not (I tested this in another package/solution but it does not seem to - not even during runtime).

I also tried running the variabledispenser method but this resulted in the package running continuously until I stop debugging.

Any suggestions greatly appreciated.

Regards,

Puzzled Again

View 3 Replies View Related

Using Oledb Connection From Connection Manager In Script Task

Aug 9, 2006

Is there anyone who tried to use a connection from connection manager to create a new connection in a script task? Including the password?

Now i passed the connection to the script task and called it in the vb script but then the password is not passed into the connect string.

Im searching for an example that works with passing the password in the connectstring?



Any help will be greatfull.


View 1 Replies View Related

Custom Task Not Updating Property Values Or Saving.

May 2, 2008

Hi Folks,

I have a task I wrote which does not always update the property value (as seen in the properties pane)
Basically, change something on the form, then update the task host property with:
this.taskHostValue.Properties["Duration"].SetValue(this.taskHostValue, Convert.ToInt32(spnDuration.Value));

Stepping through this, it does exactly what it is supposed to. Having a look at the property value, it confirms it has changed.
Reopening the UI and resetting all the controls returns the expected results.

The package however does not realise it has changed. There is no * next to the package name in the top tabs.
As long as the package thinks it is unchanged, SaveXML does not get called either so the tasks do not persist.

Changing the value on the properties pane works fine though.

The frustrating thing is this is slightly random. Slight in the sense that sometimes it works but most of the time it does not.


The sample code I used was the MS download IncrementTask (Which works BTW) so I can't see it as being a VS / SSIS bug but rather something I am / am not doing. 3 tasks I have written all behave the same. I have to "nudge" them before savign the package.

Any ideas what the problem might be?



TIA


Cheers,
Crispin

View 3 Replies View Related

Updating Connection Via VB.net

Nov 19, 2005

Hello,
I created a fairly simple SSIS package that has two connections, a Flat File and a SQL Server Connection.
Now the package works great by itself but I essentially would like to run it from withing my vb.net application. Basically all I am getting is a failure with no explanation thus I am sure I make something fundamentally wrong. Any advice would be greatly appreciated.
Dim pkgLocation As String

View 3 Replies View Related

Analysis Services Processing Task - Cube No Longer Updating

Oct 19, 2007



We have set up an IS package to process an AS 2005 database (comprising cube & dimensions, etc) daily, via a SQL Server Agent job on both development and production systems. This has been working fine for months.

A new dimension was added to the cube on the development system - automatic processing via the IS package continued without issue. However, when the new dimension was added to the production system the IS package no longer processes the cube correctly. Although all appears ok (and all is present and correct in the logs), no data updates to the cube are made. Only when the cube is manually processed does the cube get updated.

Anyone got any ideas about how to get around this issue? We have created a new IS package, with a single Analysis Services Processing Task, and tried this but get the same outcome.

View 4 Replies View Related

Send Mail Task Not Updating The ToLine Property Dynamically

Sep 19, 2007

Hi,

I am facing a very strange issue with the Send Mail Task:
I am fetching the recipient from a Recordset and storing it in a variable (MailList).

Now, I modify the Send Mail Task to include an Expression which updates the "ToLine" property with the email address in the "MailList" variable.

Moreover, I am not hard-coding the "To" property in the "Mail" tab of "Send Mail Task Editor" and leaving it blank. Now, it does not allow me to execute the package and gives me a "Package Validation Error" saying: No recipient is specified.

Any solutions?

Thanks in advance.
Regards,
B@ns

View 5 Replies View Related

How To Re-use Connection Manager ADO.NET Connection In A Script Task?

Jun 1, 2007

I'm currently using:

Dts.Connections.Item("myADO.NET connection").AcquireConnection(Nothing)Dim conn As New SqlClient.SqlConnection(Dts.Connections.Item("myADO.NET connection").ConnectionString)
conn.Open()

This seems silly, in that I'm not really using the same connection, but using the connection string of a connection that already exists. And, for my purposes, it's not working currently, because I've switched from Windows Authentication to SQL Auth... and the password isn't coming over in the ConnectionString property.How do I re-use the exact same ADO.NET connection I have in my connection manager in a script task? That's the recommended way to go, right?

View 3 Replies View Related

Integration Services :: Updating SSIS Task Standard Properties Window

May 25, 2015

If, in an SSIS package, you put an instance of an 'Execute SQL Task' task in the Control Flow, in the Properties window, you can see the properties of the task, for example CodePage.

If you double click on the task, the Execute SQL Task Editor appears, with several of the properties which are also in the Properties window, including CodePage.

If, in the Editor, you update the value of CodePage, then click OK, the value of CodePage in the Properties window is updated immediately.

I have written a custom SSIS task, which also has the same properties in the Properties window and in the Editor. The Editor also has an OK button. When OK is clicked, the values of the task properties are updated. An example property is FolderToArchive. If I open the Editor, change the value of FolderToArchive and click the OK button, the value of FolderToArchive in the Properties window is NOT immediately updated.

If, however, I select the FolderToArchive field in the Propertiesd window, it is then updated with the value I entered in the Editor.

How do I get my task to update the values in the Properties window, after changing a value in the Editor, when I click the OK button?

I would have thought I would need something like, in pseudo-code,

    Task.Parent.PropertiesWindow.Refresh
    where task is of type Microsoft.SqlServer.Dts.Runtime.Task and Task.Parent is of type Microsoft.SqlServer.Dts.Runtime.Package.

View 9 Replies View Related







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