Captiva Designer ODBC - Flow does not error out even if it returns more than one rows - captiva

I am working with Captiva Designer and implemented a flow. In the ODBC setup, I have checked the checkbox which says "Error if more than one row found".
I tested the flow and intentionally used a query which would return multiple rows. However the flow picks up the first query and process next steps accordingly.
How can I fix this issue?

For marking it as error, it will not mean to give any batch level error. However it will mention "More than one row found for fetch", in description attribute, in export module at document level.
you can handle the case accordingly in your flow using the above value.

Related

Insert status of SSIS package in SQL Table

My project consist of creating multiple sub directories and copy files to those sub directories. I developed this part using file system task inside a foreach loop in SSIS.
The final part is insert into SQL Table, the status of the process. If the file was copy successful the Status column should be "Successful" and the reason in another column should be "File was copied successfully" or something like that.
The error flow redirection (red arrow) is available for file system task or foreach loop? I have read somewhere that in event handlers you can work these status messages and insert them in SQL. Could someone please provide a solution or suggest one to solve this problem?
I would steer away from using event handlers. They are like hidden GOTOs, in which there is no indication in the control flow that they exist and you have to go to another screen to see what they are doing.
It's much more clear to use the control flow to direct errors. Any arrow from any task or container can be double clicked and configured. Change the constraint option to value=Failure to make the arrow go red.

Does the SSIS Package fail ,when one of the container failed

I have a package with 1 container.Does the ssis pacakge fail,If that container fail!?
The property
FAIL PACKAGE ON FAILURE
is false for the container.
Does that mean the package fail only if this property set to TRUE,other wise only the container status is failed ,and the package status is not !?
Yes. If the Sequence Container fails, the overall package will fail. Raise the MaximiumAllowedErrors property of the Sequence Container to get the behavior you want.
Example
Below we have an example package. The Sequence Container has a task that will never succeed.
Above, the Sequence Container has failed and the Package has failed. Below are the properties of the container above. These are the default values for a new container.
Now lets stop and study. If we compare the package behavior against the property settings, this looks wrong. Here we have set FailPackageOnFailure=False, yet a Sequence Container failure is causing a Package failure. Why is this? Unintuitive attribute names. See this Microsoft Connect issue. You are not alone in your confusion. The official explanation from Microsoft is this.
Despite some pretty circular previous messages, we believe that the
feature is behaving as designed. When you set FailParentOnFailure to
false, the parent will not fail until the number of failures in the
child exceeds the MaximumAllowedErrors threshold. When you set
FailparentOnFailure to true, the parent will fail on the first
occurence of an error regardless of the MaximiumAllowedErrors
threshold.
The important piece of information to take away from that quote is that the FailPackageOnFailure and MaximiumAllowedErrors work as a pair!!!
So - knowing this - we can achieve the expected behavior by raising the MaximiumAllowedErrors count from 1 to 2.
This will allow you to have a sequence container which fails, but does NOT fail the overall package.
Hope this helps!
It all depends on how the package and containers is set up. You have to open/import it (in SQL Server Business Intelligence Development Studio) and run on preferable test data to see which one fails. Do the two containers have inter-dependencies on each other?

Oracle ADF: Refresh Form data

I am developing a web app using Oracle ADF. I have a bounded task flow. In that I have a search page like below.
I have created the above two forms using view object data controls.
Searching is performing well. But my problem is when I go some where else in my application using menus provided left side and come back to the search page , the page is not getting refreshed. I am getting a search page that contains old search results. At this point of time if I am trying to make any changes am getting some error called "Another user with this id already modifed data ....". After this error my app is not running. Means what ever am trying to do its showing the same error.
So I need to make this: "When ever the user come to this form, He should get fresh form. It should not contain old search results.
Please help me. How do I achieve this.
Thank you.
There are 2 ways of doing it:
1) Set your task flow as ISOLATED, from Task Flow Overview tab -> Behaviour -> Share Data Control with calling task flow -> unchecked (or isolated, if you are using JDev 12c)
This will ensure you always start FRESH when accessing the page, but it will potentially create a performance overhead because entire View Object cache will be recreated (requeried) on page load. Nevertheless, it is the quickest solution.
2) You may create a default Method Call Activity in your task flow from where you may call a AM's custom method that resets the view criteria. The method will be placed on application module's implementation class and it may look like this:
public void initTaskFlow() {
this.getViewObject1().executeEmptyRowSet();
}
This will clean the result data. If you want to reset the querying parameters as well, you can use this example:
http://www.jobinesh.com/2011/04/programmatically-resetting-and-search.html
When you made any changes to any viewObject then excute this viewObject to match entity state and viewState , i think excuting viewObject will solve your issue
Ashish

Parsing sqlexception error messages

I'm using C# for end user forms,and what i want to do is to parse the error messages I get from the SQL server.Normally the end user gets the messages like in the picture.Is there a way to parse this and to give the end user what he understands instead of that gibberish there? (like "The Name Test is not permitted in this context .... " as in the picture.)
sql error code
Use Exception.ToString to display a full stack trace. Use Exception.Message to get just the text description part of the error.
In addition, you can look at the SqlException.Class and SqlException.Number properties to make informed decisions about how to handle these exceptions in your code. The SqlException.Number property will correspond to an entry in the sys.messages view. 1205, for example, is the number for a deadlock exception. And if SqlException.Class = 11, then that is a concurrency exception.
The SqlException.Errors property is a list of SqlError objects that contain more detailed information about individual errors. Since a single RPC call to the database can result in multiple exceptions, review these errors to see everything that happened.
exception.ToString() will produce a string like your picture, generally. exception.Message will include just the error message, no stack trace.
When reporting errors in SQL there is always a dilemma where the SQL message needs to convey to the developer what happen, but also provide useful information to a user of the application. We developed a technique of structuring the SQL message into an XML string that provides all the useful information about the error, which allows the caller to use as required. You can see my article on this technique on Code Project at the URL below:
http://www.codeproject.com/Articles/1076477/SQL-Server-Structure-Error-Handling

Invalid parameter error with TClientdataset

What is the reason for getting an 'invalid parameter error' when calling the CreateDataSet method in a TClientDataSet component. What causes this error.
When you have an ftString datatype field and the size of that is zero or not provided, then it also may cause this kind of error. I have tried creating the fieldefs for the dataset and haven't specified the size for the string field. I ended up with the same error.
Riaan,
are you using ftGuid fields? If so, you have to manually set the size of the field to 38.
regards,
Lieven
Lieven is correct in noting that certain TFields have different needs, as far as their properties, before the ClientDataSet to which they are associated can be created (using CreateDataSet). But the TGuid field is not the only one.
If you are having trouble determining which of the fields are causing the problem, comment out all field types except one, TStringField for instance, and then try to create the ClientDataSet. If that first group causes no problems, move onto the next. It could be as simple as a BDC (binary coded decimal) field, or something more exotic.
Once you find a field type whose presence causes the error, use the help and make sure that you are including only properties meaningful for that field type.
Also, this could also be due to an invalid parameter in an TIndexDef. For example, TIndexDef instances do not support ixExpression indexes, even though the IndexDef collection editor permits you to set this option.
Good luck...
i was in same trouble, there was no apparent reason.. and then I discovered that by chance.
Switch to text view and switch back to form view in form designer (alt+f10)
Now try to do it again. It worked for me for several times. I think a bug causes that and with recreation of components it goes away..

Resources