GeezerVison is showing github.com — Commandline options do not work in Windows · Issue #1069 · sqlitebrowser/sqlitebrowser
Commandline options do not work in Windows #1069DescriptionDetails for the issue
Version: 3.10.0 Beta1
OS: Win10 Home 1703
Application binary does not seem react to commandline options (using command prompt) in "expected" ways. For example, invoking the application with "--help" does not yield the expected help (as seen in the Application.cpp) into the command prompt. Issuing '-s' option without SQL does not seem to complain about the missing SQL (application merely starts normally).
Currently (today) I am unable to test Linux version for same behaviour.
Useful extra information
I'm opening this issue because:
- DB4S is crashing
- DB4S has a bug
- DB4S needs a feature
- DB4S has another problem
I'm using DB4S on:
- Windows: ( version: Win10 )
- Linux: ( distro: Debian )
- Mac OS: ( version: ___ )
- Other: ___
I'm using DB4S version:
- 3.10.0 Beta 1
- 3.9.1
- 3.9.0
- Other: ___
I have also:
Activitykarim commented on Jul 31, 2017 kaislahattu commented on Jul 31, 2017 3.10.0 beta1 win64 DOES open the specified datafile, which addresses the main concern (for me). However, '--help' still does nothing, although some kind of a window flashes really quick before disappearing. '-s' seem to open the application just as if it were started normally without commanline options (does not complain about missing SQL or such...).
To me it seems as if the Windows commandline options are still not working entirely as intended - but that the databasefile can now be added into a shortcut is a major convenience for me - I'll be using this version from now on. justinclift commented on Jul 31, 2017 Ahhh, are you running the commands from a batch file, or from the command line?
Asking because the --help option is pretty much targeted at people running it from the command line. In theory if you run it from there, it should display the list of known command line options and what they're for.
If it's not doing that for you though, then it's probably a bug. 😉 kaislahattu commented on Jul 31, 2017 I have a command prompt open and I am typing these ..."tests" in there (not using a batch file). I'm a happy camper now regardless - I can have my shortcuts for each datafile :) justinclift commented on Jul 31, 2017 kaislahattu commented on Jul 31, 2017 Question: Since this ticket mentions an old version, should this be closed and new created for new version (in which '--help' does not produce expected command prompt output)? ...or can this be updated? (my github fluency is remarkably non-existent) justinclift commented on Jul 31, 2017 In theory, you should be able to edit the comments and issues you've created. On the top right of any of the comments, and the original description, there should be a clickable little pencil icon which makes it go into edit mode. Give that a shot. 😄 justinclift commented on Jul 31, 2017 As a reference data point, this is what --help shows on the command line for me on OSX with our very latest source code:
$ src/DB\ Browser\ for\ SQLite.app/Contents/MacOS/DB\ Browser\ for\ SQLite --help
Usage: src/DB Browser for SQLite.app/Contents/MacOS/DB Browser for SQLite [options] [db]
Possible command line arguments:
-h, --help Show command line options
-q, --quit Exit application after running scripts
-s, --sql [file] Execute this SQL file after opening the DB
-t, --table [table] Browse this table after opening the DB
-v, --version Display the current version
[file] Open this SQLite database
The long name needed to launch the app is just a side effect of how it's compiled on OSX. On Linux it should still be sqlitebrowser, so is easier to launch. 😉 kaislahattu commented on Jul 31, 2017 My Windows prompt looks like this:
C:\Program Files\DB Browser for SQLite>"DB Browser for SQLite.exe" -v
C:\Program Files\DB Browser for SQLite>"DB Browser for SQLite.exe" --help
C:\Program Files\DB Browser for SQLite>"DB Browser for SQLite.exe" --please_say_something
C:\Program Files\DB Browser for SQLite>
justinclift commented on Jul 31, 2017 Interesting. I'll try it out on a Windows VM in a bit, and see if the same thing happens to me (eg verify the problem).
It's possible our code to output the options is being skipped on Windows for some reason. chrisjlocke commented on Jul 31, 2017 Also note that if you do put gibberish, DB4S doesn't moan. So db browser for sqlite.exe "mary had a little lamb.db" only opens a 'clean' DB4S window - it doesn't report that that file doesn't exist, or the command option was invalid.
Specifiying a valid filename does work.
This is kinda linked to the other issue when Martin added debug code to DB4S but the Windows version wasn't outputting it. Its as if DB4S is trying to display text to the console, but there is no 'console' to output it to.
This kind of makes sense, as the command prompt fires off DB4S and then hands control back to the user. It doesn't keep a 'connection' open for output to be displayed back. Maybe 'if operating_system = "windows" then display_messagebox else display_to_console...' justinclift commented on Jul 31, 2017 Just tried this out on the Windows build VM, with our latest nightly build.
@kaislahattu is definitely correct. No options get printed out, and a light coloured application window (main DB4S window maybe?) is displayed on the screen for a fraction of a second. Not enough to recognise what it was, though maybe screencasting software would be able to grab a good look at it (can't be bothered atm though). 😉
@chrisjlocke Yeah, it could be something like that. We're using qWarning() to display stuff to the console... maybe it needs special treatment to get things showing correctly on Windows. 😄 justinclift commented on Jul 31, 2017 @kaislahattu I've just added 3.10.0-beta1 to our project issue template, to make things slightly easier for future issue reporters too. 😄 chrisjlocke commented on Jul 31, 2017
though maybe screencasting software would be able to grab a good look at it
Or recording it on a smartphone? Just something we've done sometimes... (especially on BIOS errors at boot up .... crap, was it F9 for boot menu, or F12, or delete...)
and a light coloured application window (main DB4S window maybe?) is displayed on the screen for a fraction of a second.
If I run DB4S at a command prompt with the -h or --help options, DB4S just starts as normal. mgrojo commented on Sep 2, 2020 It should be fixed in next nightly build. Sorry, I didn't take enough attention to the last change 😄 chrisjlocke commented on Sep 3, 2020 Can confirm works well! 👍

Reacted by Justin Clift and Jani Tammi justinclift commented on Sep 3, 2020 Jasata commented on Sep 3, 2020 Works well and looks good doing it. -v dialog seems to also have been added with a little bit new information, which is always nice.
Thank you again for everyone giving this issue time and fixing it. 👍 Master-s commented on Aug 23, 2024 DB Browser for SQLite.exe
I want the code for exporting csv and importing it to a database chrisjlocke commented on Aug 23, 2024 Ideally, you should raise a new issue, as your issue is nothing to do with commandline options not working.
Also, you need to explain what you are exporting the csv from .. how can anyone explain how to export a csv if you haven't explained what program you're using? Excel? Another database? Wind Farm Simulator 3?
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|