0

My problem is basically the same as in the post below, but on Windows Mobile 6:

Local database, I need some examples

In short: I need a local database accompanying the executable, and I'm trying to do that using the CE database. In the first reply under the post above there is a solution, though it doesn't work on Mobile, i.e. this line can't compile:

string dbfile = new System.IO.FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).DirectoryName + "\\datafile.sdf";

And that's due to lack of the "Location" attribute.

What's the solution? I'm quite new to databases on .Net, and documentation on MSDN is too vague for me to help.

2 Answers 2

0

SQLite is the best solution for your problem statement. Itz a self-contained, serverless, zero-configuration, transactional SQL open source database engine. It occupies few KB; but manages the storage upto 2GB. Nokia is SQLite Consortium member. I tried in one of the tool developement; itz powerful. Get more info at http://www.sqlite.org/

Sign up to request clarification or add additional context in comments.

Comments

0

SQL CE should be fine. I am a bit confused on whether you are refering to on the mobile device or on a computer because you mention "it doesn't work on Mobile", and indeed the compact framework doesn't support the call to location. Some clarification on what you are specifically trying to do would help.

On the mobile device try

System.IO.Path.GetDirectoryName( 
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);

To get the folder path.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.