Thursday, July 02, 2009

Using IBM FileNet Capture 5.1, when calling the "Store" method on the Scan component, it returns a -2147417848 error code.

Scenario :
From out-of-the-box Capture 5.1, a batch was created successfully and able to scan images without any problems. However, from the custom Microsoft Visual Basic 6.0 code, a batch was also created successfully but when storing the batch by calling Scan.Store(oBatch) to the Scan component, the error below would occur:

err.Description = Method 'Store' of object '_DScan' failed
err.Number = -2147417848

Solution
The error is caused by the custom code not knowing which scanner to select.
The recommendation on different methods of assigning a scanner to the Scan component are as follows:

* Configure the Scan component on the setting to contain a default scanner so when a batch is created, it defaults to an associated scanner configured with the Scan component.

* Call the "Scan.SelectScanner" and allow the user using the custom code to select a scanner.

* Prior to calling Scan.Store(oBatch), assign a scanner to the Scan component via "Scan1.Associate("")

No comments: