This topic is locked

How to see complete sql query in debug mode

9/29/2009 5:05:57 AM
ASPRunnerPro General questions
U
uros author

Dears,
I'm working on PervasiveSQQL databases. Because this database have some 'specialities' I would like to see in debug mode complete sql query for UPDATE, DELETE and INSERT.
example:
In dbcommon.asp I set dDebug=true, so I can see in list or edit page SELECT from TABLE..

But I would like to see in edit or add page the following: UPDATE table SET.... WHERE...(SELECT
from TABLE.. )
Thank you for any suggestions.

J
Jane 9/29/2009

Hi,
we use recordset update/insert methods on the add/edit pages. There are no SQL queries on these pages.

More info here:

http://www.w3schools.com/ADO/met_rs_update.asp

U
uros author 9/29/2009



Hi,
we use recordset update/insert methods on the add/edit pages. There are no SQL queries on these pages.

More info here:

http://www.w3schools.com/ADO/met_rs_update.asp


Thank you, for answer. Could you please help me a little bit more:

When I add or edit some fields (string), and then leave it blank. When you make a recordset; are those fields included in this recorsed or not? If they are included; whit what are the fieled; null, empty string? I'm asking you, because I have a problems on updating string fields with nothing...
example:

you have on edit/add two string fields (those fields could be blank in database):
FIELD1 ->here you enter some text (egg: 'sample text')

FIELD2 ->leave blank...
Could you please write a recordset for this on update/insert?
Thank you very much.

J
Jane 9/30/2009

Hi,
in your example FIELD2 will be updated with empty string.

All fields except readonly values (set up as Readonly on the "Edit as settings" dialog) are in the update recordset.

U
uros author 10/1/2009

Hi Jane,
I try to set read only on empty fields and it is work. This problem is very strange for me, because I try to update some fields with empty string, or null value in database SQL editor and it was working, but unfortunately does not work with ASPRunner.... Is there any option, that empty fields are not included into recordset? I will upgrade to 6.2 immediately as soon I fix this problem. Please help me to solve this problem, because my boss is at the moment very....... :-)
Thank you for your help once more. The support for this program is perfect.

J
Jane 10/1/2009

Hi,
here is just a sample:

if values("FieldName")="" or isnull(values("FieldName")) then

values.Remove("FieldName")

end if