Page 1 of 1

SQLite3 issues

Posted: Mon Sep 04, 2017 12:19 am
by DareDrop
I'm trying to set up a SQLite database for DHT22 sensor readings. I seem to be able to create the DB and set up the DB table OK.
The issue is that when I attempt to insert values into the table I get a Error: no such column: 'foo'. I also tried
a alternate method and the same thing happened. Then it refused to let me quit or get help. Finally had to crash out of SQLite.

Had to reboot and then it did the same. Tried reinstalling SQLite3 and no help. I would like to make this work but I'm out of options.

Any thoughts?
Thanks

Raspi 2b
Raspbain Jessie, Updated Upgraded
Adafruit_Python_DHT.git setup and tested
I2S setup and tested
SQLite3

Re: SQLite3 issues

Posted: Mon Sep 04, 2017 12:30 am
by DougieLawson

Code: Select all

insert into testzero (name, value, pin) values('foo', 42.42, 1);
That works for me

Code: Select all

pi@saturn /tmp $ sqlite3 dht.db
SQLite version 3.16.2 2017-01-06 16:32:41
Enter ".help" for usage hints.
sqlite> create table testzero (name TEXT, value REAL, pin INTEGER);
sqlite> insert into  testzero (name, value, pin) values('foo', 42.44, 1);
sqlite> select * from testzero;
foo|42.44|1
sqlite>.quit
pi@saturn /tmp $
NOTE the shape of my apostrophes round 'foo'. They're being mucked up by your emulator ‘foo’ (those aren't 0x27 ascii).

Re: SQLite3 issues

Posted: Mon Sep 04, 2017 12:33 am
by DareDrop
Not sure I see?? Std Mac terminal..

Re: SQLite3 issues

Posted: Mon Sep 04, 2017 12:39 am
by DougieLawson
I see unicode U2018 ‘ and U2019 ’ left quote and right quotes.

When I should be seeing two U0027 ' at either end of the string.

Tis a feechur of your expensive Apple computer. I have no idea how you disable it. Search the forum with Google.

Re: SQLite3 issues

Posted: Mon Sep 04, 2017 12:52 am
by DareDrop
*^&*$#@, you are right, tried it on the PI terminal and it worked fine. CAN YOU BEAT THAT

Thanks DougieLawson

Anyone ever see that before?

Re: SQLite3 issues

Posted: Mon Sep 04, 2017 11:24 am
by DougieLawson
I've had a search around and it's some Apple OSX Maverick/Yosemite feechur called "Smart Quotes". Which to my way of thinking (IBM 3270 80x24 green screens rule) is less than desirable for a ssh terminal emulator.