469,076 Members | 1,786 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,076 developers. It's quick & easy.

store data in .net mobile app

4
Hello everyone,
I want to develop app in .net mobile that would store data, and retrieve it. For example, a user would choose a food item from a list, and the app would display calorie info for the item from database table. Would anyone have any idea how I could go about doing this? I've been playing with DataTable but I'm not sure if it the right way to do it. I'm a beginner in mobile deb :(

Thank you.
Dec 14 '09 #1

✓ answered by markmcgookin

Aha.. this one is a bit more of a useful tutorial....

Read through this carefully and follow it, use the source code only if you get stuck (its always best to learn rather than copy!)

Tutorial

7 1923
markmcgookin
648 Expert 512MB
Your best bet is to look into using SQL Server CE (Compact Edition) which is a free resource with Visual Studio.

You can create a .sdf file as your database on the device and store information in it, and retrieve it with simple SQL queries based on your user's input.

A quick google/search on bytes.com should land you some useful links on how to do this. Something like "SQL Server CE Windows Mobile" should return a bunch of results. If you have any issues, post back here and we will see if we can help you out.
Dec 14 '09 #2
mag66
4
Thank you for your reply. I came across SQL Server CE in my reserach; however I'm wondering about one thing: I wouldn't have any problem with installing it on my laptop, but I have to present this application on a computer that doesn't have SQL Server CE installed. I'm guessing the app wouldn't run then, am I right?
Dec 14 '09 #3
markmcgookin
648 Expert 512MB
Are you running this on a PDA or on a laptop?
Dec 14 '09 #4
mag66
4
I'm running the app on my laptop in visual studio using emulator.
Dec 14 '09 #5
markmcgookin
648 Expert 512MB
Ah right, so the "PDA" in the emulator is where the SQL Server CE needs to be installed. There are DLLs included with VS that you can include with your Smart Device project to allow it to run SQL Server CE on the Emulator, as it would run on the PDA.

Try reading through this MSDN tutorial on how to connect to SQL Server CE using windows mobile and c#


EDIT - Infact... that's too complex. Forget that tutorial. Its a lot simpler than that. You can create an sdf file and populate it with SQL on the device if you want. Or connect to it through SQL server management studio. SQL Server CE runs on the DEVICE/EMULATOR allowing apps to work when they are not connected to anything.
Dec 14 '09 #6
markmcgookin
648 Expert 512MB
Aha.. this one is a bit more of a useful tutorial....

Read through this carefully and follow it, use the source code only if you get stuck (its always best to learn rather than copy!)

Tutorial
Dec 14 '09 #7
mag66
4
ok. Thank you very much!! I'll give it a try.
Dec 15 '09 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

35 posts views Thread by Troll | last post: by
9 posts views Thread by Mark Goldin | last post: by
8 posts views Thread by rriness | last post: by
2 posts views Thread by Mukesh | last post: by
3 posts views Thread by ninjamonkey | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.