FTP Task Connection Problem
May 25, 2007
Problem: my FTP Connection Manager cannot connect to the FTP service specified in its configuration parameters. When I execute the FTP Task hooked to that connection manager I get the following error:
[FTP Task] Error: Unable to connect to FTP server using "FTP Connection Manager".
When I test the FTP service using FTP from a command prompt on the same workstation using the same parameters it connects just fine.
When I attempt to edit the settings in the FTP Connection Manager, the editor window pops up and then immediately disappears which is another problem. As I watch closely I can see that the username property is set to my domain login, not the value I typed in when I created it.
So I used the property sheet for the manager to set all the parameters correctly. However it still will not connect. Am I missing something? I've seen posts concerning issues connecting to UNIX/LINUX based FTP services. This particular service is hosted on a LINUX box. TIA.
View 1 Replies
ADVERTISEMENT
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
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
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
Nov 28, 2007
Hi,
under the script that I use for upload file using SSIS asp.net task.
My problem....
If I comment this line
'ftp.SendFiles(files, "", True, False) ' the True makes it overwrite existing
upload made successfull without failure instead If I leave uncomment I got an error but files upload anyway correct.
Someone can give me some explains about this behavior?
TNKS Alen, Italy
------------------
Public Sub Main()
'Create the connection to the ftp server
Dim cm As ConnectionManager = Dts.Connections.Add("FTP")
'create the FTP object that sends the files and pass it the connection created above.
Dim ftp As FtpClientConnection = New FtpClientConnection(cm.AcquireConnection(Nothing))
Try
'Set the properties like username & password
cm.Properties("ServerName").SetValue(cm, "xxxxxx")
cm.Properties("ServerUserName").SetValue(cm, "xxxxx")
cm.Properties("ServerPassword").SetValue(cm, "xxxxx")
cm.Properties("ServerPort").SetValue(cm, "21")
cm.Properties("Timeout").SetValue(cm, "0") 'The 0 setting will make it not timeout
cm.Properties("ChunkSize").SetValue(cm, "1000") '1000 kb
cm.Properties("Retries").SetValue(cm, "1")
'Connects to the ftp server
ftp.Connect()
'****************************************
' Potrebbe servire in futuro la tengo
'****************************************
''Get file listing
'Dim fileNames() As String
'Dim folderNames() As String
'ftp.GetListing(folderNames, fileNames)
''ftp the files
'ftp.DeleteFiles(fileNames)
'Build a array of all the file names that is going to be FTP'ed (in this case only one file)
Dim files(1) As String
files(0) = "\manny-slaveappWorkFACT-FINDERa.txt"
files(1) = "\manny-slaveappWorkFACT-FINDER.txt"
'ftp the file
'I found it by mistake by creating both the FTP connection and task in the SSIS package and it defaulted the remote path setting in the FTP task.
'ftp.SendFiles(files, "", True, False) ' the True makes it overwrite existing file and False is saying that it is not transferring ASCII
ftp.Close()
Dts.TaskResult = Dts.Results.Success
Catch ex As Exception
ftp.Close()
Dts.TaskResult = Dts.Results.Failure
Finally
ftp.Close()
End Try
End Sub
View 6 Replies
View Related
Oct 22, 2007
When I try to create an SSIS package with an FTP task, it always fails to compile with the messages:
Error at Package: The connection "" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Error at FTP Task [FTP Task]: Connection manager "" can not be found.
Error at FTP Task: There were errors during task validation.
(Microsoft.DataTransformationServices.VsIntegration)
The item is marked with a circled-X. The tool-tip also agrees: The connection "" is not found.
Using my recreation steps below, I am setting up a connection manager, but it is never found at compile time.
1. Open BIDS, select a new Integration Services project.
2. Drag an FTP task from the toolbox to the Control Flow window.
3. Double-click the FTP task.
4. On the FTP Task Editor window, General page, pull down the FTPConnection property.
5. Select <New Connection...>
6. On the FTP Connection Manager Editor window, enter the servername, port, username and password.
7. Click "Test Connection" to verify connectivity. (It succeeds.)
8. Click OK on the FTP Connection Manager Editor window.
9. Click OK on the FTP Task Editor window.
I'm not using a configuration file or logging provider for this example.
I have also installed SP2 + cumulative update 2.
View 2 Replies
View Related
Aug 24, 2007
hi,
how can i declare my connection string in script task without having it hardcoded?
can I have a sample? i'm connecting to a sql database.
thanks a lot
cherriesh
View 1 Replies
View Related
Dec 19, 2007
Hi All,
I am using a SSIS package to import the .xml data file from FTP location and process them into SQL Server DB by using Stored Procedures. I am using FTP Task to retrieve the file from FTP location but it only works when ever internet is available otherwise it fails, I placed this package as a SQL Server Agent Job. Can anybody tell me the way to check the CONNECTION before FTP Task start its process to avoid the errors???
Please see the error below which I get from SQL Server Agent:
"Description: Failed to decrypt protected XML node "DTSroperty" with error 0x80070002 "The system cannot find the file specified.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2007-12-19 04:00:03.66 Code: 0xC001602A Source: AA_Trans Connection manager "FTP Connection Manager" Description: An error occurred in the requested FTP operation. Detailed error description: The password was not allowed . End Error Error: 2007-12-19 04:00:03.67 Code: 0xC002918F Source: FTP AA Transactions Receive FTP Task Description: Unable to connect to FTP server using "FTP Connection Manag... The package execution fails"
Thanks in advance.
Zeeshan.
View 1 Replies
View Related
Sep 5, 2006
Hi All,
I am working on a SSIS package which is using a Script task, now I have all the connection properties set up in the .NET script using connection strings, what do I need to do if I have to set this up using a config file or something else which is more secure (I dont want to leave the connection information in the script). Please Advice.
Thanks
View 3 Replies
View Related
Dec 18, 2007
When I try this code in an SSIS "Script Task":
Dim dbConnectionManager As ConnectionManager = Dts.Connections(0)
Dim dbConnectionRaw As Object = dbConnectionManager.AcquireConnection(Nothing)
Dim dbConnection As OdbcConnection = CType(dbConnectionRaw, OdbcConnection)
I get this error:
Unable to cast COM object of type 'System.__ComObject' to class type 'System.Data.Odbc.OdbcConnection'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
I'm just trying to get a basic database connection from the DTS package in my
script task. Is there a better way to do this? Preferably, I would use ADO.NET
rather than the old COM stuff. However, if SSIS still requires the use of COM,
that's fine as well, as long as I can fix the above code.
Thanks in advance!
View 14 Replies
View Related
Jul 19, 2006
Hi,
I used adodb connection and recordset in script task. but i have an error saying adodb is not defined. how do i add it to reference? or, is adodb can run in script task or only ado.net?
cherrie
View 2 Replies
View Related
Jun 9, 2006
I have OLE DB Connections set up in my connection manager (Native OLE DBMicrosoft OLE DB Provider for SQL Server). I would like to reference and query these connections from a custom task, written in C#. I currently reference it as follows:
using System.Data.OleDb;
...................................
OleDbConnection connection = (OleDbConnection) connections["MyConnection"].AcquireConnection(null);
What may be obvious to some (though wasn't to me, as I am new at this), when I run the task, I get an error saying that I cannot make this cast. After perusing the boards, I understand that this is because I am not making a cast to the right connection type. Well, that is where I am lost. What connection type (and corresponding library) do I need to reference? I want to continue to use the "Native OLE DB..." connection.
Thanks!
View 3 Replies
View Related
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
View Related
May 14, 2015
I have a SSIS 2014 project that is being deployed to the 2014 SSIS catalog. In one of the packages there is a script task that uses an ftp connection manager within the package.
There is structured error handling in the script and it runs fine in development, but fails when deployed and scheduled to a SQL Server agent job. The error that is being returned isn't permissions of authentication failure, but returns as the task times out. The package and project use encryption by password.
View 3 Replies
View Related
Jun 18, 2007
Hi,
I'm using Integration Service between Firebird and MS SQL 2005. I can able to move data from Firebird db tables to MS SQL db tables using DataReader source (Firebird Connection Manager) and SQL Server Destination (SQL Server Connection Manager) component.
Now I want to execute parametrized SQL statement to fetch data from Firebird DB using Execute SQL Task Component. In this process while trying to set Connection property to this component I can able to view only MS SQL Connection Manager and it is not listing Firebird Connection Manager.
Now I need a help to get connect this Execute SQL Task component with Firebird connection Manager. Help me to find out where I'm making mistake.
FYI. I'm using Firebird .Net Provieder 2.0.1
Thanks in advance.
Suku
View 4 Replies
View Related
Mar 29, 2007
Hello All,
I am trying to convert an application created using DTS classes to SSIS object model. I have found following code in the application.
For x As Integer = 1 To mTask.Properties.Count
If mTask.Properties.Item(x).Name = "SourceConnectionID" Then
CnID = mTask.Properties.Item(x).Value
Exit For
End If
Next
For x As Integer = 1 To mPkg.DTSPackage.Connections.Count
If mPkg.DTSPackage.Connections.Item(x).ID = CnID Then
Return mPkg.DTSPackage.Connections.Item(x).Name
End If
Next
Return mTask.Properties.Item("SourceObjectName").Value
How can I retrieve or Set "SourceConnectinId", "SourceObjectName" of a data flow task in SSIS
Please help me to solve this problem.
Thanks in advance
Subin
View 5 Replies
View Related
Jan 10, 2008
Hi!
I have problem using Data mining query task: when I want to set connection to Analysis services DB I don't see connections created in connection manager (they are not listed in the dropdown). (I can click on "New" and create new one but I already have one created in connection manager.)
Also, I want to make connections created in the connection manager flexible, easy to change after transfering package(s) to another server. How to do that?
Thanks in advance!
View 3 Replies
View Related
Dec 18, 2007
Hi
I am running into issues with custom objects interaction with visual studio 2005.
1. Custom connection manager.
I am setting the name of the connection manager ( to standardize naming convention ) that user created, however when the CM is created, the name displayed in visual studio is still the default name even if the real name is the one i set. I have to do things like, edit it or save package - close - reopen, create another connection, ... etc in order to get it refreshed.
2. Custom Task
I am managing some variables in this custom task so that I will be adding and deleting variables in the package.
The challenge i am running into is, when I added 2 variables for example, even though the variables are successfully added to package, the Variable Window in visual studio designer will not reflect the new variables. I have to save package, close, and re-open in order for the variables to show up.
So this brings to my question - is there any way to tell Visual Studio programmatically to refresh the contents of these 2 sections, 1 is the Variable Window and the other is the panel containing the list of connection managers.
I have been searching around and found some clue about visual studio SDK but I still cannot find an exact way of doing it. Visual Studio SDK example tells you how you can access the Variable window as
framesList = new List<IVsWindowFrame>();
toolWindowNames = new List<string>();
// Get the UI Shell service
IVsUIShell uiShell = (IVsUIShell)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SVsUIShell));
// Get the tool windows enumerator
IEnumWindowFrames windowEnumerator;
ErrorHandler.ThrowOnFailure(uiShell.GetToolWindowEnum(out windowEnumerator));
IVsWindowFrame[] frame = new IVsWindowFrame[1];
uint fetched = 0;
int hr = VsConstants.S_OK;
// Note that we get S_FALSE when there is no more item, so only loop while we are getting S_OK
while (hr == VsConstants.S_OK)
{
// For each tool window, add it to the list
hr = windowEnumerator.Next(1, frame, out fetched);
ErrorHandler.ThrowOnFailure(hr);
if (fetched == 1)
{
// We successfully retrieved a window frame, update our lists
string caption = (string)GetProperty(frame[0], (int)__VSFPROPID.VSFPROPID_Caption);
toolWindowNames.Add(caption);
framesList.Add(frame[0]);
}
}
But i looked up the methods for IVsWindowFrame and it does not have anything to refresh the contents of the frame.
I thought about firing events but cannot find which one to fire.
Any help on this will be greatly appreciated.
Terry
View 14 Replies
View Related
Aug 14, 2015
Is it possible to parameter the connection of a Lookup Transformation task - specifically the table/view name? I would like to be able to dynamically set the table that the Lookup Transformation is connecting to at runtime.I've looked into the "Use results of an SQL query" on the connection screen (which correlates to the "SqlCommand" property), but I'm unable to pass in a parameter this way.I've also looked into the SqlCommandParam, but that doesn't allow me to use a parameter in the "FROM" clause of the sql syntax.
View 4 Replies
View Related
Oct 29, 2007
Hello,
We have an SSIS job that runs once a day and sends emails.
For security reasons, IT switched the send-mail porton the smtp server from 25 to a different number (let's say 1234).
So, I changed the SSIS SMTP Connection Manager's smtpServer string to smptserver:1234
However, this does not seem to be working. I keep getting 'Send Mail Failure' error.
Any ideas how to set the port number for sending emails using SSIS?
thanks much,
Muhammad
Cobalt Group
View 3 Replies
View Related
Feb 28, 2008
Hi,
I am trying to figure out how to override the column delimiter from a script task for a flat file connection.
Before outputing the data into a file, I have a variable which contains the delimiter to be used... but as it seems that this property cannot be changed through an expression, I assume it has to be done throught code...
However, the connectionmanager object doesnt seem to have the delimiter as an available property.
Any help would be appreciated
View 16 Replies
View Related
Aug 1, 2007
Is there a way to directly do this in one step(Execute SQL Insert Statement from Script Task using package OLEDB Connection)?
Right now I'm using a script task to build a sql insert statement using package variables (to fill values) populated by certain logic in the package.
Then assigning this command string to a package variable.
Then using a sql execute task to execute this variable.
A link to an article or code would be greatly appreciated.
View 1 Replies
View Related
Jul 18, 2007
I have a simple parent package that calls 3 small simple child packages (child1, child2, and child3). Each child package does nothing but contains a FlatFile connection. I run these 3 child packages in parallel inside parent package. The parent package fails sometimes (i.e. sometimes success, but sometimes failed). And the failure is replicable.
I would like to send you all of 4 simplest packages via email if anyone is interested in helping out.
Here is the error info
Code Snippet
SSIS package "parent.dtsx" starting.
Executing ExecutePackageTask: C:SSISDasLoaderchlid3.dtsx
Executing ExecutePackageTask: C:SSISDasLoaderchld2.dtsx
Executing ExecutePackageTask: C:SSISDasLoaderchild1.dtsx
Error: 0xC0014005 at : The connection type "FLATFILE" specified for connection manager "_MedicalClaimServiceLine_070713_161742152820" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.
Error: 0xC0010018 at : Error loading value "<DTS:ConnectionManager xmlns:DTS="www.microsoft.com/SqlServer/Dts"><DTS:Property DTS:Name="DelayValidation">0</DTS:Property><DTS:Property DTS:Name="ObjectName">_MedicalClaimServiceLine_070713_161742152820</DTS:Property><DTS:Property DTS:Name="DTSID">{CA12C" from node "DTS:ConnectionManager".
Error: 0xC00220DE at child2: Error 0xC0010014 while loading package file "C:SSISDasLoaderchld2.dtsx". One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.
.
Task failed: child2
Warning: 0x80019002 at parent: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Information: 0x40016042 at chlid3: The package is attempting to configure from the parent variable "z".
Information: 0x40016042 at child1: The package is attempting to configure from the parent variable "x".
Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning.
View 5 Replies
View Related
Apr 29, 2015
I have a Data Flow Task within a ForEach loop container. The source of the flow is ADO.NET connection and the destination is a Flat File Connection. I loop through a collection of strings in the ForEach loop. Based on the string content, I write some data to the same destination file in each iteration overwriting the previous version. I am running into following Errors:
[Flat File Destination [38]] Warning: The process cannot access the file because it is being used by another process.
[Flat File Destination [38]] Error: Cannot open the datafile "Example.csv".
[SSIS.Pipeline] Error: Flat File Destination failed the pre-execute phase and returned error code 0xC020200E.
I know what's happening but I don't know how to fix it. The first time through the ForEach loop, the destination file is updated. The second time is when this error pops up. I think it's because the first iteration is not closing the destination file. How do I force a close of the file within Data Flow task or through a subsequent Script Task.This works within a SQL 2008 package on one server but not within SQL 2012 package on a different server.
View 5 Replies
View Related
May 2, 2008
We find that if we deploy the OLAP database with a different name on the test server, then regardless of how we change the connection string provided to the SSIS package that processes the cube, then the package fails to connect to the database. To clarify:
In development the OLAP database is called MyOlapDB and the source database is called MySqlDB. Both are on the same machine. When the the application is built and released for test, the test team install the databases on a replica of the production environment (i.e. web app on one machine, OLAP DB on another and SQL database on yet another). They also, quite rightly, implement the new test databases so they incorporate the build version number. So, MyOlapDB123 and MySqlDB123 are both from build 123.
This is when the problems start. Regardless of how the connection string is specified in the job that processes the cube, the SSIS integration package fails with the error:
[Analysis Services Execute DDL Task] Error: Errors in the metadata manager. Either the database with the ID of 'MyOlapDB' does not exist in the server with the ID of 'OurTestServer', or the user does not have permissions to access the object.
We have tried config files and job properties, but neither work. Also, simply attempting to run the package using the DTEXECUI does not work either.
Looking inside the XML of the package, we clearly see the ConnectionManager object which has the original connection string, which is
Data Source=localhost;Initial Catalog=MyOlapDB;Provider=MSOLAP.3;Integrated Security=SSPI;Impersonation Level=Impersonate;
However, editing the initial catalog here still does not solve the problem. Searching the XML for the string MyOlapDB reveals the OLAP database name in two other places - both within the object data of the two Analysis Services Execute DDL tasks.
Anyone know how to solve this problem without having to hack the XML of the package?
View 4 Replies
View Related
Jan 2, 2007
Hi Everyone,
I haven't been able to successfully use the ADO.NET connection type to use both input and output parameters in an execute sql task containing just tsql statements (no stored procedure calls). I have successfully used input parameters on their own but when i combine it with output parameters it fails on the simplest of tasks.
I would really find it beneficial if you could use the flexibility of an ADO.NET connection type as the parameter marker and parameter name can be referenced anywhere throughout the sql statement in no particular order. The addition of an output parameter would really make it great!!
Thanks
View 11 Replies
View Related
Jun 21, 2007
OK. I give up and need help. Hopefully it's something minor ...
I have a dataflow which returns email addresses to a recordset.
I pass this recordset into a ForEachLoop configuring the enumerator as (Foreach ADO Enumerator). I also map the email address as a variable with index 0.
I then have a Execute SQL task which receives this email address as a varchar variable (parameter 0) which I then use in my SQL command to limit the rows returned. I have commented out the where clause and returned all rows regardless of email address to try to troubleshoot this problem. In either event, I then use a resultset to store the query result of type object and result name 0.
I then pass this resultset into a script variable to start parsing the sql rows returned as type object. ( I assume this is the correct way to do this from other prior posts ...).
The script appears to throw an exception at the following line. I assume it's because I'm either not passing in the values properly or the query doesn't return anything. However, I am certain the query works as it executes just fine at the command prompt.
Try
ds = CType(Dts.Variables("VP_EMAIL_RESULTS_RS").Value, DataSet)
My intent is to email the query results to each email address with the following type of data by passing the parsed data from the script to a send mail task. Email works fine and sends out messages but the content is empty. I pass the parsed data as string values to the messagesource and define the messagesourcetype as a variable in the mail task.
part number leadtime
x 5
y 9
....
Does anyone have any idea what I might be doing wrong?
thanks
John
View 5 Replies
View Related
Jun 30, 2006
I have a simple SSIS package with three "Execute SQL Tasks". I am using ADO.Net Connection to execute SPs on a DB server.
When I execute this package It works fine. So far so good.
Now, I need to implement transation on this package. And problem starts now onwards. When I try to execute package after setting TransationOption = Required for the Sequence container which contains all the tasks, I get following error.
[Execute SQL Task] Error: Failed to acquire connection "NYCDB0008.Export". Connection may not be configured correctly or you may not have the right permissions on this connection.
"NYCDB0008.Export" is the name of the ADO.Net connection. I have been hunting for any solution but all in vain. I have tried changing all DTC settings on the dev as well as Database server.
Please respond if anyone has any solution.
Thanks!
Anand
View 24 Replies
View Related
Jan 18, 2007
Hi ALL,
Getting Access Denied To FileName Error When Using the Execute Sql Task (With File Connection) into a Foreach Loop Container.
Please Note :
I have a folder containing .sql files. I have to dynamically loop through the files and send them as a File connection Folder to the Execute Sql Task.
When I run this Package I am getting the follwoing error :
[Execute SQL Task] Error: An error occurred with the following error message: "Access to the path 'C:ProjectsFuzzy Lookup DataFlow ExampleScripts' is denied.".
Also I have logged in to the machine as Administrator and to Sql Server with sa.
Please help.
Thanks.
Regards,
Salil
View 1 Replies
View Related
Dec 26, 2007
I have an Execute SQL Task that executes "select count(*) as Row_Count from xyztable" from an Oracle Server. I'm trying to assign the result to a variable. However when I try to execute I get an error:
[Execute SQL Task] Error: An error occurred while assigning a value to variable "RowCount": "Unsupported data type on result set binding Row_Count.".
Which data type should I use for the variable, RowCount? I've tried Int16, Int32, Int64.
Thanks!
View 5 Replies
View Related
Jul 23, 2007
I'm trying to use the SSIS Execute SQL Task to pull XML from a SQL 2005 database table. The SQL is of the following form:
SELECT
(
SELECT
MT.MessageId 'MessageId',
MT.MessageType 'MessageType',
FROM MessageTable MT
ORDER BY MT.messageid desc
FOR XML PATH('MessageStatus'), TYPE
)
FOR XML PATH('Report'), TYPE
For some reason I can only get this query to work if I use an ADO.NET connection type. If I try to use something like the OLEDB connection I get the following error:
<ROOT><?MSSQLError HResult="0x80004005" Source="Microsoft XML Extensions to SQL Server" Description="No description provided"?></ROOT>
Can anyone tell me why the SELECT ... FOR XML PATH... seems only to work with ADO.NET connections?
Thanks
Walter
View 1 Replies
View Related
Feb 6, 2008
I have a package that uses a for loop to iterate through an unknown amount of excel files and pull their data into a table. However, there will be cases when the file is corrupted or has some sort of problem so that either the transformation will fail or the excel data source will fail with an oledb connection error.
Could anyone suggest a clean way to trap these errors? Specifically, the "Cannot Aquire Connection from Connection Manager", which is the excel connection.
Thanks,
John T
View 3 Replies
View Related