Both have always been created, as far as I can tell. And in the creating routine, they're visible. However, at checkpoint 5, you see both fields when I put it to the output window by script. However, at that point, stepping through, if I type the command into the message box, I get a different result--only dna is visible. This is the case as soon as the return from crdna (and possibly inside; I forget).phaworth wrote:Hi hawk,
Well, not sure what I'm doing different than you but everything looks fine to me.
I had to change tDatabasePath to be valid on my computer but after that the outwin field lists both tables each time you put something in to it. I looked at both databases in another program and they both had both tables in them.
So as soon as it returns from crdna, I try the message box. Only dna is visible. I step over, and it shows both dna & dinfo from the script. I then do it from the message box, and it only sees dna.
IN this situation (and when it arises in other scripts), I can manipulate table dna, but attempting to manipulate dinfo throws errors--except that I can delete dinfo from places that can't otherwise see it. If I try to delete a second time, it throws an error (as it should).
Shouldn't the declaration at the top of the script, before any handlers, handle all the handlers in that stack?One problem may be that you are not declaring your globals in all your scripts. I see them in the stack script of your main stack but I don't see them declared anywhere else. That might be OK if you only reference them in handlers in your main script, but if you try to access them from any other scripts, there'll be problems because the script won't know anything about them.
Really? I don't get it with either one of them!For example, trying to execute revDatabaseTablenames(debtordb) in the message box returned an error because debotordb wasn't available to it as a global, but if I put revDatabaseDebtorDB(1) into the message box, it listed both your tables.
----Edit------
If I type "put revDatabaseTablenames(getdebtorDB())" into the message box, it displays both tables.
--------------
put debtordb, getdebtordb()
from the message box yields
2,2
I know that they *do* have both tables; but revDatabaseTablenames() doesn't see them, and a SELECT on that table throws an error.I also looked at both databases you create with an external program and they both contained both tables, so I'm not sure why you think they only have one table in them.
There's not going to be just one incidence of the database.I still think you shouldn't be dealing with the structure of your database in your application. There are plenty of utilities out there that will create an sqlite database for you so all you have to do is open it in your application. I'll declare a vested interest in that statement because I sell such a utility. It's called SQLiteAdmin and you can find it at http://www.lcsql.com. There's a 30-day trial available for download. Some of the functionality is not available in the demo version but if you open your database(s) with it, you'll see that both tables are there and you will be able to add other tables and/or columns if you need to.
An attorney will buy my program, and need a new database for each client's petition.
.
The program needs to be able to deal with the database structure, and update it to accommodate additions to the program
Making the attorney use another program to create a database for each case would be a non-starter.
Some firms will have a few new ones on a daily basis, others maybe only once a month.
Also, I'm using sqlite for the moment simply because it's there; I expect it to generally use postgresql or mysql, especially in a cloud configureation.
It does; thanks.Hope that helps,
hawk