Adding retrieval argument causes "Column 2 has an invalid name and/or length" error

Symptom

Adding a retrieval argument to an existing DataWindow causes a "Column 2 has an invalid name and/or length " error. In addition, every other argument on the DataWindow's retrieval list is blanked out

Environment

  • Microsoft Windows 7

  • PowerBuilder

  • ActiveIdentity service

Reproducing the Issue

These are the steps to reproduce the issue:

  1. Create a new DataWindow on a Windows 7 machine where the ActiveIdentity service is running.

  2. Select a table and some columns. 

  3. Select Design/Retrieval Arguments. 

  4. Add 1 retrieval argument and then click the 'Add' command button again. 

  5. Try to add another retrieval argument and click OK and you should see the error:  "Column 2 has an invalid name and/or length "

Cause

The cause of the error was determined to be the ActiveIdentity service.

Solution

Disabling the program or service solves the problem.

You can also work around the problem by adding the arguments manually if you are unable to determine which service is causing the problem.

To manually add arguments do the following:

1. Create a DataWindow with a single argument.

2 Close the DataWindow painter, right click on it in the treeview and select Edit Source.

3. Search for arguments in the source code.


4. Add arguments and save the file.


5. Open the DataWindow in the DataWindow painter and open the SQL view in order to associate the second argument with a field in the DataWindow.