Closed mikeptweet closed 9 years ago
which version of sqlite3 ? have you read changes needed due sqlite3 changes ?
are you initializing like this? https://github.com/WebReflection/dblite#dblite
Sqlite3,exe is 3.8.8.2 ... my code is here (and I've tried it with all variations of your doc.
var dblite = require('dblite').withSQLite('3.8.6+');
//dblite.bin = "c:/nodejs/sqlite3.exe";
var db = dblite(':memory:');
db.query("Select sqlite_version() as version",function(err, rows) {
if (err) {
throw err;
}
else {
console.log(rows[0]);
}
});
would this change make any difference?
dblite.bin = "c:\\\\nodejs\\sqlite3.exe";
which windows?
Nope ... tried it on Windows 7, 8 & Windows Server 2012 ... all the same. I did a brand new installation of Node on a clean machine ... still the same
I've finally found the problem, it's SQLite. They changed again the EOL
of the csv, so while 3.8.6
introduced \r\n
on Linux, 3.8.8
forces \n
on windows too.
Moreover:
Encoding considerations:
As per section 4.1.1. of RFC 2046 [3], this media type uses CRLF
to denote line breaks. However, implementors should be aware that
some implementations may use other values.
That leads to the following reference
The TL;DR answer here is:
defineCSVEOL
when it comes to assigning the value and just use EOL='\n'
instead, that fixes everything.withSQLite
BS initializationsqlite3
query.The latter one requires quite a big refactory but since chaps behind SQLite keep playing with the bloody Line Feed randomly and accordingly with their daily mood, I don't see how this project could be defined usable in any other way.
I thought features detections were a thing of the Web, even the most used database in the world needs this stuff.
Apologies for any inconvenient
updated the README too
can you please confirm that 0.7.0
works again as expected? I've hopefully solved this annoying thing forever.
Thank you
Its Working! That you so much for your prompt .
On Wed, Feb 25, 2015 at 4:04 AM, Andrea Giammarchi <notifications@github.com
wrote:
updated the README https://github.com/WebReflection/dblite#warning too
— Reply to this email directly or view it on GitHub https://github.com/WebReflection/dblite/issues/33#issuecomment-75926938.
Dblite stopped working again on the latest node (7.5.0) ... probably related to this same issue. Can you please take a look as I have an app depending on this?
Thanks a bunch
Can you please take a look as I have an app depending on this?
You should test everything works before updating ;-)
Can you give me more details about the issue? Is it still a Windows Machine? Which Windows? Which version of sqlite?
It looks like it was a bum sqlite shell executable on Windows ... I downloaded the latest and it works OK.
Sorry for the false alarm and thanks again for this library :-)
This worked fine but know it doesn't work on node v0.10.36
No errors, no nothing from the tests ... doesn't look like it's spawning sqlite3.exe
Windows