netsys
Posts: 39
|
Posted: 10/29/2014, 1:18 PM |
|
I'm using an editable grid that's been working pretty well for quite some time to allow multiple rows to be updated at once in a table. Every now and then, like maybe once every 20 or 30 times I use it, the update doesn't happen. There are no errors but the update doesn't take place. It doesn't seem to have anything to do with the number of rows being shown (sometimes there are 10, sometimes there are 70). I can't reliably make it happen, and don't know how to put any error checking in place, since I'm using the custom update function on the form, so am not doing the SQL insert by hand. Any ideas?
|
|
|
eratech
Posts: 513
|
Posted: 10/29/2014, 9:10 PM |
|
Have a look at the one of the common files that handles the database connection (eg: for mysql it is 'db_mysql.php' on my PHP project) and there is a 'debug' parameter near the top
There should be something similar in the ASP project - set it to 1 and publish just that file and it will print ALL the SQL queries used on a page.
Otherwise, you can add some 'response.write(sqlquery)' lines to the Before Update events. Or you can also save text to a session variable and then display that on the screen.
Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
netsys
Posts: 39
|
Posted: 10/30/2014, 8:38 AM |
|
Thanks - I was able to write out the SQL for the datasource for my editable grid in the Before Update area. I wasn't quite able to figure out how to get it to show me the data it was writing as it looped through the rows to update the table though. I've actually changed my custom update to use SQL instead of table, and am now unable to reproduce the error. I found a few other people, in looking around, who had success with this. As I said, this isn't an error that happens very often, so hopefully I've fixed it now with the change.
|
|
|
eratech
Posts: 513
|
Posted: 10/30/2014, 7:56 PM |
|
Glad you had some (possible) success. The Database Debug flag is very useful.
Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
|