SQLite Forum

Finding database file
Login
>  I am new to SQLite, webkit and all of the other access methods. I apparently don't understand everything that I am trying to do. I have accessed the database thru JS but can't get a transaction to work.

Firstly, it's perfectly OK being a novice, that's how we all start, but you are making one very typical rookie mistake: Thinking that the rest of us know what's going on.

With regards to your project, we are as novice as you, we have no clue. We rely on your very full description of every little detail to try and grasp it.

If we have full information, helping you becomes trivial and pleasurable. If we have to shake the box like a christmas gift to try and guess what is inside, it ends in frustration usually.

Further to this, it's almost never SQLite that is broken, so to try and help, us SQLiters have to start a guessing procedure about the target platform. You can find tons of discussions on the forum of the form:

"Hi Guys, my SQLite doesn't work because when I ask it for x y and z, I get  nothing/badness."  
"Really? what platform do you use? How do you ask it?"  
"I use Programming Language PL-X. Here's some code:".  
```
  "  G#^&*("SELECT a,b,c FROM x");"  
  "  *#^*&&*%^#("Slightly legible text");"  
```
  " See? it doesn't do the thing."  
"Ok, but what OS, architecture etc...?"  
"It runs on OS Dingdong on a Jimbo-Pro PC."  
and (from some reader who happens to know PL-X):   
  "what does it do when you run *#&%#("ver"); ?"  
"It says: $@%^$#8=1!"  
"Ok, have you tried doing a, b or c?"  
...long silence...  
"Oops, PL-X on Dingdong works different than I thought - Soz for the noise."  

Which leaves us with a sort of frustrated emptiness... We've invested in this user's problem, and got nothing back. (Nor does the next PL-X programmer who comes along find any use in that thread).

Please say what you are doing, what you are trying to do, what you expect to see vs. what you are seeing, on what, in what, for what and what have you all tried before getting stuck - and for the love of Jebbediah, if you get an error, quote the full error message and error code/number.

I know it's impolite to write a wall of text for mass consumption on a twitter, for instance, but in a technical forum it's essential to be thorough, and most people are happy to skip over the bits they don't need to read, but when they start forming an opinion of the problem, it's helpful to be able to go back and read it fully to check.
Even this post from me is too long for most to read, so they'll skip over most of it, but somewhere someone will read it all and might find it helpful - I'm hoping that's the OP in this case.

</2c>

---

Enough of that, on to the actual problem...

Above and beyond the mentioned Java ring-fencing of data, Windows itself also has virtualization weirdness that may or may not be turned on, so when you say "it should go into 'c:\\users\\craig\\db\\medical.db" - how sure are you about that? - Specifically, how sure are you it's not a copy of the file? Have you tried making a random new non-existing DB (from the JS app) and see if that file gets put there?  
[PS: That is not a folder that typically would be virtualized, but the checking is no less important]

When you say it fails on the "first" statement....  
You have only 1 statement "db.transaction(...)" - hopefully it fails in there, and if it does, some debuggers might put the failure indicator line somewhere that it thinks the problem happens, which may make it seem like a different thing is the problem.

Does selecting from the DB (sans transaction) work as expected? (producing good verifiable data?)