398 users using DBSP now!
home -> documentation -> How to guide


How to guide: Problems list

1. DBSP does not recognize correctly when to "execute" a SQL Statement and when to "open" it.
2. Avoiding DBSP pages for remain stored in the browser cache.




DBSP does not recognize correctly when to "execute" a SQL Statement and when to "open" it.

Symptoms

Database server returns the error:
  • Cursor not returned from Query
  • Invalid cursor handle
Explanation

DBSP detects automatically when to execute a SQL sentence and when to open it (the SQL will return rows). However, the pre-analysis phase of the sentence not always recognizes correctly each of the cases due the fact that every RDBMS has it own extended version of the SQL language.

Solution or workaround

Put a comment as the first line with the SELECT keyword and the sentence will be opened.

-- SELECT

EXEC PROCEDURE CALCULATEUSAGE

Put a comment as the first line with the UPDATE or DELETE keyword and the sentence will be executed.

-- UPDATE

DECLARE @A INT SELECT @A = USERID WHERE USERID = :USERID



Avoiding DBSP pages for remain stored in the browser cache

Symptoms

When the user presses the back button, the information displayed is not valid (after and insert, update or delete).

Explanation

The DBSP page is retrieved from the web browsers cache or some other cache and is not requesting the page directly to the server.

Solution or workaround

Put this code snippet at the beginning of your DBSP page. The header tag with the no cache parameter prevents the page for being stored in the cache.

<#HEADER NAME="Cache-Control" VALUE="no-cache,no-store"/>