Dear all,

I am getting the following error when I issue an execute query command:

Exception message => Datasource "OTV_SO_M" has no current row.
Procedure => api_datasource.getRowNumber
Exception code => e_noCurrentRow
unsecure events sent from client => N
Called from: PKG = FS_MISC. LINE = 55
Called from: 256=>PROCEDURE N2.FS_QRY.EXECUTEQUERY
Called from: 239=>PROCEDURE N2.FS_QRY.EXECUTE_ENTER_QRY

FS_QRY.EXECUTEQUERY has the following command:
api_datasource.executequery('OTV_SO_M');

When the panel opens the data is fetched and populated in the OTV_SO_M datasource. However, when re-querying using api_datasource.executequery('OTV_SO_M') I am getting the above no current row error.

'Force Current Row' is ticked in the datasource creation screen.

Kindly help me to solve this issue.

regards,

George.

asked 19 Apr '14, 02:25

grajan777's gravatar image

grajan777
1011230
accept rate: 10%

edited 19 Apr '14, 03:49


Hi George,

Formspider raises e_noCurrentRow exception during execute query because you checked the force current row option. Formspider tries to set a current row but the query probably doesn't return any rows. Therefore Formspider can't set the current row and throws an exception. Seemd like all you have to do is handle the exception.

Kind Regards,
Yalim

link

answered 19 Apr '14, 04:01

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 22%

Hi Yalim,

i have this situation:

1) A combobox with search criteria. When event "valueChanged" occurs, it starts up an action to requery.

2) The query is done from a procedure with api_datasource.executeQuery('datasource-name');

With some search criteria no records will be found, so i also run into the error "Datasource XXXX has no current row".

Where do i capture this exception? I tried in the same procedure that invokes executeQuery, but that does not help.

Kind regards, Jan Willem Vermeer

link

answered 30 Oct '14, 05:56

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
1231331
accept rate: 0%

Hi Jan,

The exception you need to capture is api_exception.e_noCurrentRow. The API documentation indicates which exception each API raises. You should handle exceptions raised by the API's in the procedures you call them.

api_datasource.executeQuery does not raise e_noCurrentrow. This exception is raised by API's that attempt to access to the current row of a datasource (for a get or a set operation) but cannot find one. I guess most if not all of these API's are in the api_datasource package.

Kind Regards,
Yalim

link

answered 31 Oct '14, 14:41

Yalim%20Gerger's gravatar image

Yalim Gerger ♦♦
1.8k5
accept rate: 15%

Thanks Yalim.

With this information i could investigate this problem further. It appeared that the error was raised in the procedure fired by the Current Row Changed action on that datasource. Probably during this call: api_datasource.getColumnValueTx.

After implementing the exception in this procedure, also the detail datasource is cleaned up now.

Kind regards,

Jan Willem

link

answered 31 Oct '14, 15:23

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
1231331
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×17
×9
×2

Asked: 19 Apr '14, 02:25

Seen: 1,453 times

Last updated: 31 Oct '14, 15:23


© Copyright Gerger 2017