User avatar
ChrisBriggsy
Posts: 27
Joined: Wed May 06, 2015 5:58 am
Location: Brisbane
Contact: Website

Using SQLite in Windows 10 IoT Core Insider Preview

Mon May 25, 2015 11:29 am

Do you need a lightweight reliable database? Does it need to work without an internet connection? Do you want to save yourself a mountain of configuration…Then the answer is SQLite!

In the blog post I outline the benefits of using SQLite and provide a step by step tutorial.

http://blog.chrisbriggsy.com/Using-SQLI ... r-Preview/
Want to learn the basics of Windows Universal app development for devices running Windows 10 IoT Core through to how to integrate the solution with Windows Azure? than check out blog.chrisbriggsy.com/Dev-superpowers-Jumping-into-windows-internet-of-things

GerritV
Posts: 91
Joined: Fri May 01, 2015 4:16 pm
Location: St Catharines, ON
Contact: Website

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Mon May 25, 2015 5:56 pm

Excellent write up, thank you!

I'll be needing this 'real soon now' once I finish refactoring a ton of c code to C#.

Gerrit

Heater
Posts: 13704
Joined: Tue Jul 17, 2012 3:02 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Mon May 25, 2015 6:56 pm

Why do you refer to translating algorithms expressed in C into algorithms express in C# as "refactoring"?

Isn't that "translating" or "reimplementing"?
Memory in C++ is a leaky abstraction .

User avatar
DougieLawson
Posts: 36337
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Mon May 25, 2015 7:25 pm

Heater wrote:Why do you refer to translating algorithms expressed in C into algorithms express in C# as "refactoring"?

Isn't that "translating" or "reimplementing"?
Refactoring means untangling spaghetti code to make a program do the same thing externally but make the implementation cleaner and easier to maintain. It seems to becoming one of those things that makes a mark on the BS bingo cards.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Heater
Posts: 13704
Joined: Tue Jul 17, 2012 3:02 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Mon May 25, 2015 8:20 pm

DougieLawson,

Quite so. Refactoring is a wonderful idea. If you can take a big pile of randomly thrown together code and tease out it's different functionalities or "areas of concern". Isolate them. Modularize them. Reduce interdependence between them. Etc, ect. That is great. It's all about finding the right abstractions for your problem domain.

Rewriting a pile of C code in another language is not "refactoring".

Might sound good on a C.V. now a days I guess :)
Memory in C++ is a leaky abstraction .

GerritV
Posts: 91
Joined: Fri May 01, 2015 4:16 pm
Location: St Catharines, ON
Contact: Website

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Mon May 25, 2015 8:43 pm

Wow, sorry for using the wrong words. It is part refactoring and part re-coding in C#. It will be sort-of OO like the original code but not likely to suit the crowd here.

I will be sure NOT to share the results here, the nitpicking would take too much effort to deal with and frankly not worth my while.

And my 42+ year CV doesn't need any more experiences added, thank you.

Gerrit

I have disabled Reply notification so don't bother.

Heater
Posts: 13704
Joined: Tue Jul 17, 2012 3:02 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Mon May 25, 2015 8:56 pm

GerritV,

Sorry if I have upset you with any of my comments.

My only excuse is that I have lived for too long in a world where discussion or debate is very tough.

Do not hide your light under a bushel on my account.
Memory in C++ is a leaky abstraction .

SebastianM
Posts: 29
Joined: Mon May 11, 2015 11:00 am
Location: Germany, BW
Contact: Website

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Tue May 26, 2015 8:36 am

I'm new to this Forum and I also recognized the hostile and not very "sensitive" behavior of many Posters here, especially when using MS Products.

Personally, I did not feel very welcome here. I'm sorry that I have to admit that but that's how it was.

I currently think about leaving this Forum....

At least the rules mentioned in the stickies (no MS Bashing and so on..) should be respected or enforced.

Saying that, i don't explictily refer to Heaters posting but to the General mood and behavior here.

Sebastian

P.S. Forgot: Thank's Chris, good one. I will give it a try!
Battleship scale model: https://www.icloud.com/sharedalbum/de-de/#A55oqs3q4mFHQ

Heater
Posts: 13704
Joined: Tue Jul 17, 2012 3:02 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Tue May 26, 2015 9:48 am

SebastianM,
...no MS Bashing...i don't explictily refer to Heaters posting...
As you have drawn some connection there I have to defend myself. I do not see an MS bashing by me or anyone else on this thread. In fact I see no bashing of anything here.

I thought I was asking an innocent question about the meaning intended behind the use of the word "refactoring".

I even put a smiley at the end of the one statement that I thought might be misconstrued or slightly controversial.
Memory in C++ is a leaky abstraction .

User avatar
joan
Posts: 14394
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Tue May 26, 2015 10:50 am

SebastianM wrote:I'm new to this Forum and I also recognized the hostile and not very "sensitive" behavior of many Posters here, especially when using MS Products.

Personally, I did not feel very welcome here. I'm sorry that I have to admit that but that's how it was.

I currently think about leaving this Forum....

At least the rules mentioned in the stickies (no MS Bashing and so on..) should be respected or enforced.

Saying that, i don't explictily refer to Heaters posting but to the General mood and behavior here.

Sebastian

P.S. Forgot: Thank's Chris, good one. I will give it a try!
No comment on your core point.

May I point out that there would be far less Windows posts if Heater was not posting?

User avatar
Forrrge
Posts: 120
Joined: Fri Apr 27, 2012 6:07 am
Location: Gateshead, UK.

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Tue May 26, 2015 11:55 am

Whats a great write up, hope to see many more.

Heater
Posts: 13704
Joined: Tue Jul 17, 2012 3:02 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Tue May 26, 2015 7:35 pm

joan,
May I point out that there would be far less Windows posts if Heater was not posting?
Is that a statement of fact or a question?

SQLite is a wonderful thing, thank you ChrisBriggsy.
Memory in C++ is a leaky abstraction .

User avatar
ChrisBriggsy
Posts: 27
Joined: Wed May 06, 2015 5:58 am
Location: Brisbane
Contact: Website

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Tue May 26, 2015 10:48 pm

Thank you Forrrge, Gerrit, Heater and Sebastian for your positive feedback on the blog post.
Want to learn the basics of Windows Universal app development for devices running Windows 10 IoT Core through to how to integrate the solution with Windows Azure? than check out blog.chrisbriggsy.com/Dev-superpowers-Jumping-into-windows-internet-of-things

engineer42
Posts: 23
Joined: Mon Oct 26, 2015 1:21 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Thu Nov 19, 2015 9:29 am

[quote="ChrisBriggsy"][/quote]
Hello Chris

My sqlite project is working on raspberry pi 2 (with all function insert,delete,update ..) but Where is my sqlite database files location ? Where my files being saved windows iot device or my own computer?
i followed this way but i didnt found my sqlite database location :(
my sqlite project vs2015
Package.appxmaifest\Packaging\Package name : 9fd5092f-7eb0-4607-bc31-e41f02c4f1e4
and
C:\Users\computerName\AppData\Local\Packages\PackageName\LocalState
this path doesnt content my sqlite db files

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Thu Nov 19, 2015 5:06 pm

From a PS or SSH

Code: Select all

cd \
dir {somenameincluding*and?ifrequired} -s
will find it for you.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

engineer42
Posts: 23
Joined: Mon Oct 26, 2015 1:21 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Fri Nov 20, 2015 1:13 pm

ricl wrote:From a PS or SSH

Code: Select all

cd \
dir {somenameincluding*and?ifrequired} -s
will find it for you.
thanks ricl

I found my databases and list this command dir *.sqlite -s
How can i do copy sqlite files transfer( or copy) my own pc from rpi2 windowsIoT.

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Fri Nov 20, 2015 1:25 pm

Just map the Pi as a network share.


14. See that drive I have now mapped (and the C: drive as well :-) )

On the Desktop use File Explorer. Enter

Code: Select all

\\{PiNameOrIpAddress}\e$
and logon with Pi Admin Username and Password (for c: use c$)

https://ms-iot.github.io/content/en-US/ ... es/SMB.htm

If you want to drive it the other way then any of the UWP Network methods will work to a network end point
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

engineer42
Posts: 23
Joined: Mon Oct 26, 2015 1:21 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Fri Nov 20, 2015 2:27 pm

ricl wrote:Just map the Pi as a network share.
i didnt find my username password

username :minwinpc password :?

how can i find password ?

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Fri Nov 20, 2015 3:27 pm

The default password (which you change immediately on first logon) is

'[email protected]' (That's a zero not a capital O)

https://ms-iot.github.io/content/en-US/ ... s/Webb.htm

https://ms-iot.github.io/content/en-US/ ... tupRPI.htm
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

User avatar
DougieLawson
Posts: 36337
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Fri Nov 20, 2015 3:39 pm

ricl wrote: '[email protected]w0rd' (That's a zero not a capital O)
FTFY, you're welcome.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Fri Nov 20, 2015 3:47 pm

Thanks. Damn finger never type what I think.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

engineer42
Posts: 23
Joined: Mon Oct 26, 2015 1:21 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Sat Nov 21, 2015 10:11 am

ricl wrote:The default password (which you change immediately on first logon) is

'[email protected]' (That's a zero not a capital O)
hi ricl

i changed my rpi2 devicename and password
device name : kvm pass: kvm1453

when i write my device name or ip like //kvm/c$ i see a screen

i filled the blanks username : kvm password : kvm1453 i didn't access sharing file .
how can i solve this problem?

engineer42
Posts: 23
Joined: Mon Oct 26, 2015 1:21 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Sat Nov 21, 2015 10:12 am

i see this screen.
Attachments
usernamePass.png
i see this screen
usernamePass.png (9.04 KiB) Viewed 6579 times

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Sat Nov 21, 2015 11:00 am

You need to enter the Admin user name as

192.168.1.21\Administrator (or whatever your ip address for the Pi is)

and then

{adminpassword}

This gets the username\password into the right domain, i.e. on the Pi.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

engineer42
Posts: 23
Joined: Mon Oct 26, 2015 1:21 pm

Re: Using SQLite in Windows 10 IoT Core Insider Preview

Sat Nov 21, 2015 11:39 am

ricl wrote:You need to enter the Admin user name as

192.168.1.21\Administrator (or whatever your ip address for the Pi is)

and then

{adminpassword}

This gets the username\password into the right domain, i.e. on the Pi.
ricl Thank you so much i solve this problem because of you.

username: kvm\Administrator(Administrator important)
password: kvm1453

solved.

Return to “Windows 10 for IoT”