Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6812911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:30:26+00:00 2026-05-26T20:30:26+00:00

I have a dead-simple question. How to use any SQLite library with nodejs under

  • 0

I have a dead-simple question. How to use any SQLite library with nodejs under Windows? I have looked into the sqlite3 lib and it requires compilation which is linux-specific. In general, this is not the first time I’m facing a question of this type. Same problem I had with TameJS. If anyone knows any solution for this, I would be grateful. Google is silent.

PS: Cygwin is not an option. The target application should be an easy in usage portable database, driven by nodejs, and having a web-browser interface.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:30:26+00:00Added an answer on May 26, 2026 at 8:30 pm

    Read at the bottom for Update 2 (2013-12-06) – there is now a pure JS module which looks promising for windows work…

    I’ve been having a similar problem, and shy some pretty magic with re-linking the windows SQLite (or compiling the existing nodejs packages) the best I could come up with is to use a child process and shell out to the console sqlite client and then capture the results… Not the prettiest, and I have no idea if this can scale, but in a limited intranet scenario it might be Good Enough™.

    Update:

    Here’s some code which I cobbled together – give you an idea in case you’re not that familiar with child_process module. This works on nodejs 0.6.0.

    First I build up the command required to pull something out of sqlite:

    var cmd = '"' + sqlitePath + '" "' + dbPath + '" "select * from sqlite_master"';
    

    Note, if you include the optional flags -noheader and -list then you might get slightly better output for parsing. You can also control the field delimiter by using -separator 'x' where x is your delimiter.

    Then I actually spawn the child process:

    var child = exec(cmd, function(error, stdout, stderr) {
            if (error) {
                console.log('error while trying to do stuff...');
                // error message in error and stderr
            } else {
                console.log('success');
                // successful stuff is in stdout
            }
        });
    

    In combination with some string parsing and playing with the sqlite console client’s options you may be able to get this to do enough. I do say again, however, this is not production tested – I’m just mocking up some intranet stuff, and even so I’m sure it’s not the best approach!

    Update 2 (2013-12-06):

    For folks reading this question now, you might be interested to check out sql.js on github; it is a pure JS implementation of sqlite which looks promising for interacting on windows (or whatever platform). Please note, to install via npm the package name is node-sqlite-purejs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

greetings, i have a simple question. I have some page that i use for
I have a dead simple Common Lisp question: what is the idiomatic way of
I want a dead simple generic $_GET-vars validator, and don't have any desire to
I have the following dead simple elisp functions; the first removes the fill breaks
I have a dead simple progress bar using something like the following: import sys
another fun (and probably really simple) question for you, that I have half worked
I have a very general question and have prepared a simple test case. When
I'm looking for a library that makes it dead-simple to present a UIPickerView (or
Perhaps it's a syntax error, but I never assume that. I have a -dead-
How would you go about dead code detection in C/C++ code? I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.