Page 1 of 1
Can you update a database on closeStack ?
Posted: Tue Oct 15, 2013 3:02 am
by shawnblc
I've been trying to update a MySQL database on closeStack, not having much success. Can this be done or does it have to be done prior?
Re: Can you update a database on closeStack ?
Posted: Tue Oct 15, 2013 3:22 am
by Simon
Here is a test for you to try
on closeStack
answer the revOpenDatabases() --should not be empty
Or you can move the save further up the chain to:
on closeStackRequest
I don't have an example that I have done which proves either.
Simon
Re: Can you update a database on closeStack ?
Posted: Tue Oct 15, 2013 3:30 am
by shawnblc
Simon wrote:Here is a test for you to try
on closeStack
answer the revOpenDatabases() --should not be empty
Or you can move the save further up the chain to:
on closeStackRequest
I don't have an example that I have done which proves either.
Simon
on closeStack I get this (see image). Let me try the other now.
Re: Can you update a database on closeStack ?
Posted: Tue Oct 15, 2013 3:40 am
by shawnblc
Hmmmm. I'll stay up until I figure this out. lol.
on closeStack and on closeStackRequest I can't get my database to update. onMouseUp I can update it, but I don't want a mouseUp, I need to update it on close too.
Re: Can you update a database on closeStack ?
Posted: Tue Oct 15, 2013 3:51 am
by shawnblc
Got it! Thank you Simon!
Re: Can you update a database on closeStack ?
Posted: Tue Oct 15, 2013 4:48 am
by Simon
Hi shawnblc,
Can you say what was the solution?
And Holy Cow! That is a lot of open databases
Simon
Re: Can you update a database on closeStack ?
Posted: Tue Oct 15, 2013 5:54 am
by shawnblc
Simon wrote:Hi shawnblc,
Can you say what was the solution?
And Holy Cow! That is a lot of open databases
Simon
It's the same database, the same stack has been opening the database while I try and learn this. I haven't closed the connection, which I will do.
I'll post solution that I came up with in next post and will update the previous post after I close my db connection.
Re: Can you update a database on closeStack ?
Posted: Tue Oct 15, 2013 6:01 am
by Simon
Thanks shawnblc, at least I will learn from your discovery.
Simon
Re: Can you update a database on closeStack ?
Posted: Tue Oct 15, 2013 6:14 am
by shawnblc
Simon wrote:Hi shawnblc,
......
And Holy Cow! That is a lot of open databases
Simon
Only one database open now

Re: Can you update a database on closeStack ?
Posted: Tue Oct 15, 2013 6:23 am
by shawnblc
Simon wrote:Hi shawnblc,
Can you say what was the solution?
...
Simon
I used closeStackRequest with an update to my database, then revExecuteSQL, showed an answer tSQL to make sure my SQL query was right. It looked good so I commented it out. I also used on closeStack. I used your suggestion

Worked like a charm.
I did a lot of learning today. Thanks to you (Simon) and Bangkok on an earlier post I had today. Maybe one day I'll be able to say I was a noob

Thanks to both of you.