Microsoft KB Archive/238367

= PRB: Error Message "Unspecified Error" When Executing a DTS Package Modified Dynamically =

Article ID: 238367

Article Last Modified on 2/24/2004

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition
 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q238367



SYMPTOMS
When Executing a DTS (Data Transformation Server) package modified dynamically in code, you might see the following error message:

Unspecified Error" -2147958789 from package.Execute method.

The DTS ScriptPackage tool also fails with the same error when you try to script that package.



CAUSE
The ODBC Connection string is not set properly. If you load that package in DTS Designer and then execute, you get a more detailed error message:

[Microsoft] [ODBC Driver Manager], data source name not found and no default driver specified



WORKAROUND
Set the ODBC connection string in the extended properties: oConn.ConnectionProperties("Extended Properties").Value = "Driver={SQL Server};Server=(local);Uid=;Pwd=;Database=myDB"



MORE INFORMATION
For an OLEDB connection, you can set the connection properties as given below:    oConnection.DataSource = "."

oConnection.UserID = 

oConnection.Catalog = "myDB"

However, for an ODBC connection, the properties are set in "Extended Properties" as given below:

oConnection.ConnectionProperties("Extended Properties") = "Driver={SQL Server};Server=(local);Uid=;Pwd=;Database=myDB"

Note You must change User ID  and password  to the correct values. Make sure that User ID has the appropriate permissions to perform this operation on the database.

For additional information, please see the "Connection Object (DTS)" and "OLEDBProperties Collection (DTS)" topics in SQL Server Books Online.

Keywords: kbdatabase kbprb KB238367

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.