Unanswered: Cryptic error message when running PowerBuilder DataWindow
I am trying to fix a problem with a PowerBuilder DataWindow. I am running PowerBuilder v7.0.
I have based the DataWindow on a stored procedure, which runs quite happily in SQL Advantage or any other SQL client (Rapid SQL for example). The stored procedure returns a dataset, which has several columns all with valid names. However, when I run the DataWindow, the following error message appears:
Select error: ct_bind(): user api layer: external error: An illegal value of 13 given for parameter item.
I have run the report via the Debugger and have watched how the report is run, i.e. the report parameters are passed to an array and then the array is passed to the report at run-time. However, all of the parameters look fine (i.e. when I use the same parameters running the stored procedure, it works) and none of them have a value of 13!!
Can anyone help? I'm a VB user moving to PowerBuilder because of change of jobs, and, at present, I am wondering why on earth I made the move. Please someone, prove me wrong!!
The solution to the problem was that the defined fields in the DataWindow did not match the fields being returned in the stored procedure's dataset, i.e. one of the fields in the SP had been commented out.