Can't run sqlite3 in Shell in Windows

This works on OS X, but doesn’t work on Windows.

dim cmd as string cmd="echo .dump | sqlite3 " + dbFile.shellPath + "> " + newFile.shellPath 'DB_fixed.sql" sh.execute cmd

On Windows I get the shell.result of “‘sqlite3’ is not recognized as an internal or external command, operable program or batch file.”

  1. I installed Sqlite3 shell and dll in c:\windows\system32\
  2. If I run a Windows cmd shell and run the above command it works fine. (finds sqlite3)
  3. c:\windows\system32\ is in the path
  4. Tried renaming sqlite3 to sqlite3.exe

(Of course if anyone knows how to recover a corrupt sqlite3 database file without resorting the sqlite3 command line, I’d be happy to hear that too, but we didn’t have any luck with RB sql selects to get the existing data.)

What happens if you try:

  cmd="echo .dump | c:\\windows\\system32\\sqlite3 " + dbFile.shellPath + "> " + newFile.shellPath   'DB_fixed.sql"

‘c:\windows\system32\sqlite3’ is not recognized as an internal or external command,
operable program or batch file.

‘c:\windows\system32\sqlite3.exe’ is not recognized as an internal or external command,
operable program or batch file.

(I restarted Windows, too, but that made no difference)

Could it be a case-sensitivity issue? (After that, I’ve got nothing, sorry.)

Sounds like its not installed propertly

Can you run that command in a Windows Shell directly by hand ?

A corrupted db might not be recoverable as the engine is, in both the REALSQL & SQlite3 the same sqlite engine (maybe minor differences in the version)

Yes, I can run the command in a Windows Shell directly.

I’m trying to run it in the RB shell so that it can be recovered.

Are you by chance using 64-bit Windows?

I’m using Parallels with Win 8 demo installed to test - no clue if that’s 32 or 64. I’m trying to test on an actual machine but my wife took the power cord the netbook so I can’t test on that yet.

If you have a C:\Windows\SysWoW64 folder, try using that path in your RB shell.

That worked. I copied the sqlite3 executable and dll to that folder also since that sort of made sense to do.

Crashing elsewhere now, but got the shell cmd to work.

Now that you’ve got it installed in SysWOW64, you shouldn’t have to specify the path in the command. SysWOW64 is where 32-bit system programs/libraries are supposed to be installed on 64-bit Windows. Then Windows will automatically substitute SysWOW64 for System32 when a 32-bit process is run. WOW64 = Windows (32-bit) On Windows 64-bit.