DareDrop
Posts: 14
Joined: Sun Aug 20, 2017 1:18 am

SQLite3 issues

Mon Sep 04, 2017 12:19 am

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
Attachments
SQLite3_issue.JPG
SQLite3_issue.JPG (56.86 KiB) Viewed 893 times

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: SQLite3 issues

Mon Sep 04, 2017 12:30 am

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).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

DareDrop
Posts: 14
Joined: Sun Aug 20, 2017 1:18 am

Re: SQLite3 issues

Mon Sep 04, 2017 12:33 am

Not sure I see?? Std Mac terminal..

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: SQLite3 issues

Mon Sep 04, 2017 12:39 am

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

DareDrop
Posts: 14
Joined: Sun Aug 20, 2017 1:18 am

Re: SQLite3 issues

Mon Sep 04, 2017 12:52 am

*^&*$#@, you are right, tried it on the PI terminal and it worked fine. CAN YOU BEAT THAT

Thanks DougieLawson

Anyone ever see that before?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: SQLite3 issues

Mon Sep 04, 2017 11:24 am

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Troubleshooting”