Error: Retrieving the file name for a component failed with error code 0x03B98F74 - sql-server-2005

I have simple SSIS ActiveX Script task that is returning with the above error when executing:
I've cut all the code down to just an empty function:
function main
end function
And have ensured the EntryMethod property of the component is main
Any suggestions?

I came across this same error and found that a connection in the activex script was referencing a dsn name that didn't exist. I added the DSN through control panel -> administrative tools -> Data sources (ODBC) and the issue was resolved.

This useful error will be thrown for ANY error in an ActiveX script task (although the error code will vary). In my particular circumstance it only occurred when running under the 64 bit DTEXEC process which made it convoluted to track down. Hopefully of some use to anyone supporting ancient tech.

Related

CreateObject("ADODB.Command") - Run-time error '429': ActiveX component can't create object

I have an old Access solution that includes opening a connection and inserting some lines in a SQL database. I had to make a very small change that had nothing to do with that connection. After the change I compacted the database.
The solution works normally for me, but the person that normally runs it is getting the Run-time error I outlined in the subject. I had another user try and also got this error. It seems I am now the only one that can run this, yet I did nothing to the code or the access db as a whole that I can see explaining this.
The button they press that triggers the error:
Sets a variable as ADODB.Connection
Defines the connection string
ERROR TIME: Then it runs a function that executes a stored procedure using that connection. The error point is showing as occurring at the top of that function, when it attempts to CreateObject("ADODB.Command").
Run-time error '429': ActiveX component can't create object
Can anyone offer anything as to why this user that could work with it suddenly can't despite the same security, same machine, etc.
Sigh... Thanks for the responses. It turns out to be our security software and the fact that I moved the solution to a different location. Out of sight out of mind. I forget that I have some exemptions setup for myself, so I didn't see how it could be that. I just need to learn to check that stuff first.

System.AccessViolationException after a second use of an ADODB Connection

I’m suffering a frustrating error for the last two weeks in a vb.net application developed for my company.
The application consists of a basic interface (Windows Form Application) to get some data (file paths and coordinates) and then processes a lot of information coming from a steel structure modelled in an external application called Staad.Pro (very common in the Oil & Gas sector) and from several Excel files.
So it gets external information from two sources:
A Staad.Pro file, through the library openstaad.dll,distributed with
Staad.Pro.
Some Excel files, through the ADO Connection and Recordset objects.
The application has been used satisfactorily for three years. I recently made some changes to introduce the background process of the data and the definition of the configuration for every project company using an external Excel file, which was previously defined at code level.
This configuration file is read directly in Excel opening an application instance (Excel), while the others Excel files are opened using ADO as I said previously. At the same time, the configuration file path is defined in a single text file, that it is always used by the application to read that path, which content can be modified using the application through an OpenFileDialog object.
I specify in particular those points because they are the changes I made before the error occurrence. There have been also two weeks of inactivity because of my holidays, during which some Windows updates have been released (I suppose some of them are related to the popular ransomware Wannacry and Petya).
So the error message I get running the application in VS Community 2015 is the following:
An unhandled exception of type 'System.AccessViolationException'
occurred in mscorlib.dll.
Additional information: Attempted to read or
write protected memory. This is often an indication that other memory
is corrupt.
It appears when the application opens the second ADO connectionn to an Excel file with the following code:
cnn1.Open("Provider=Microsoft.ace.OLEDB.12.0;" &
"Data Source=" & rutaarchivo & ";" &
"Extended Properties=""Excel 12.0;HDR=Yes"";")
The first connection is closed and the corresponding object is set to Nothing. I changed the way of access to this file trying to understand the error, avoiding ADO, but the error arises again in a later connection to another Excel file with ADO, that is again the second ADO connection after the changes.
The error arises randomly, in such a way that when the project is just opened in VS Community 2015 and then it is run for the first time, no error appears (usually), but it does after a second execution.
Other times the error arises at the call to the subroutine that makes the ADO connection to the Excel file, not at the code of the subroutine itself, with a different message:
Managed Debugging Assistant 'FatalExecutionEngineError' has detected a
problem in (path).
Additional Information: The runtime has encountered
a fatal error. The address of the error was at 0x79f387d1, on thread
0x168c. The error code is 0xc0000005. This error may be a bug in the
CLR or in the unsafe or non-verifiable portions of user code. Common
sources of this bug include user marshaling errors for COM-interop or
PInvoke, which may corrupt the stack.
When looking for an error pattern I found another error that appears when I use for the second time the same type of object of the library openstaad.dll, with the following message:
An exception of type 'System.Runtime.InteropServices.COMException'
occurred in Microsoft.VisualBasic.dll but was not handled in user code
Additional information: La memoria está bloqueada. (Excepción de
HRESULT: 0x8002000D (DISP_E_ARRAYISLOCKED))
I’ve found two main articles on the internet about this error (System.AccessViolationException):
Programs randomly getting System.AccessViolationException
https://www.codeproject.com/Questions/106826/OpenFileDialog-OleDbConnection-AccessViolationExce
I’ve tried to reinstall Access Database Engine, to define the environment variable that is mentioned and to change the .NET Framework version. Nothing works.
Any help to solve this problem will be appreciated.
Alberto Ruiz
I experienced the same error recently after the second use of an Microsoft.ACE.OLEDB.12.0 connection, to MS Access in this case.
What helped for me was wrapping the connection in a new Thread.
For example: if your problematic code that opens the connection is in method OpenExcel you could do the following:
(new Thread(() => OpenExcel())).Start();
Hope this helps.

SSIS ERROR: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020

I have problems with SSIS process(acctually the same problem occurs for two different processes). So, we are doing some ETL work using SSIS. We have Business Intelligence project that executes without errors from Visual Studio. However when its deployed on the server and scheduled as a job it fails with errors like:
INTRASTAT_Towar:Error: SSIS Error Code
DTS_E_PROCESSINPUTFAILED. The ProcessInput
method on component "Union All 3" (876) failed with error
code 0xC0047020 while processing input "Union All Input
2" (916). The identified component returned an error from
the ProcessInput method. The error is specific to the
component, but the error is fatal and will cause the Data
Flow task to stop running. There may be error messages
posted before this with more information about the failure.
INTRASTAT_Towar:Error: SSIS Error Code
DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput
method on istat_dekl_wynik_poz SELECT returned error
code 0xC02020C4. The component returned a failure
code when the pipeline engine called PrimeOutput(). The
meaning of the failure code is defined by the component,
but the error is fatal and the pipeline stopped executing.
There may be error messages posted before this with
more information about the failure.
INTRASTAT_Towar:Error: The attempt to add a row to the
Data Flow task buffer failed with error code 0xC0047020.**
The other returned errors are similar, sometimes instead of 0xC0047020, there is unspecified error. Errors occur only on this one table, that has a lot of different stuff inside data flow task(unions, multicasts, conditional split). Most other data flows have just source, dest and transformation, and they are not causing any problems. I've been suggested to try manipulating DefaultBufferMaxRows and DefaultBufferSize properties values for the data flow task, but after doing some research I dont belive that it will solve the issue, as they are currently put on default values. Any suggestions?
Well, I managed to work the issue with my packages. I was using 2012 SSIS version, but I executed packages in 32 bit environment in BIDS. The server acctually executed in 64 bit and for some projects that was the problem. One checkbox in step properties to make it execute in 32 bit env and I solved the problem we have been fighting for weeks.
I was also facing the same issue, I just did below step.
Open Data Flow tab>>Click anywhere except any task and then Right Click>>Properties>>Change **ForceExecutionValueType** to **Int64**
You can follow my screenshot:
Watch out for indexes on the destination tables - especially unique ones because this will throw an error that's doesn't pinpoint the problem.
For people who stumbled here for the same error. If you are trying to copy data from one Azure SQL database to another using SQL Server Import and Export Wizard. Use the 64-bit version.
From your windows search for SQL Server 2019 Import and Export Data (64-bit).

Rethrow an error from within SSIS package

Ive got a 2010 SSIS package which in turn runs other packages. Each package is independent so if one fails the others can still progress. My logic states the next one run on completion of the previous one wether it failed or not
My proble is that when one does error i get a very standard error message which doesn't tell me which one crashed or give me any other clues.
The Integrated Services Dashboard does assist but still lacking basic information. But what i would like is that the package rethrow the error so i can add some more ifnormation to it.
How is this done?
Do i create a script task in the Onerror event for the individual package and add some information of my own before rethrowing the error ?
Any examples that show you what needs to be done ? I still want the other packets to continue to execute.
First thing is that there is no 2010 version of SSIS. You are using Visual Studio 2010 against either 2008 R2 or 2012 but this does not affect the question in any way.
The best way to capture this error information is to log the error information in the child packages. This can be implemented using an SSIS frameworks such as
Free - http://ssisetlframework.codeplex.com/
Commercial product - http://pragmaticworks.com/Products/BI-xPress
Using these frameworks you could easily get the detailed error information that you need without having to modify the control package.

Quit SSIS Script task without error or anything

You'd think you find such thing easily on google (or any other search provider) -> not.
I have a SSIS package that runs every 5min.
My package has an error routine in the onError event handler but I don't want it to get in there.
So in fact, the package should just exit / close / kill itself without any warning or error.
Preferably this should be initiated by the script task (vb.net 2008)
Thanks a lot in advance!
L
In your script task (vb.net):
RunningPackage.Stop()
More info here:
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.runningpackage.stop.aspx#Y0