I am using xamarin studio with xcode to create a ipad application
I have created database and table using sqlite.
Questions is, how do I view all the data I have input in the table and database.
Thanks for any answer!
SQLite Browser will help you to add/update/delete and query data in tables, and also view data.
Ideally you should save the database file in
Path.Combine (Environment.GetFolderPath(Environment.SpecialFolder.Personal), "DBName.db");
This will be at following path >
/users/[name]/Library/Application Support/iPhone Simulator/[version]/Applications/SomeNumberedApp/Documents/DBName.db
where SomeNumberedApp is a folder which will contain:
Documents folder
Application file for your app (named after your app)
Library folder
tmp folder
You would find your database in Documents folder.
SQLite Manager is a Firefox plugin that allows you to manage SQLite databases.
Related
I m trying to put a custom path in QML file but can't get it done.
I'm trying to get de db in a shared folder where i'm willing to put the DB so any person who has the program can acces to data.
I'm using Sqlite and Qt Creator 5.7 but not a lot of info about this.
You can simply COPY the database from its default path. Typically that is located (In windows anyways) at
C:\Users\<username>AppData\Local\<program name>\QML\OfflineStorage\Databases
and on Mobile devices it is stored in a similar place --
on android its in a sub folder of:
/data/data/<Program Name>
On *nix it is located:
/home/<user>/.local/share/[ProjectName]/QML/OfflineStorage/Databases
I have a predefined SQLite database and want to ship it with my App, so I can access it at runtime.
How do I achieve this?
Moreover, I want to Unit Test my app. So far the database file is referenced with the Unit Test Project as basis. Hence, my paths get broken.
How do I test a app like described above?
I've answered to the similar question at MSDN forum. It may help you.
I'm creating UWP app with SQLite.Net-PCL I already have a SQLite db
that I want to use (I do not want to create a new one in the app).
I've copied it to the root of my project folder. How do I access it?
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/b6d7a970-0088-4bd4-aaa8-c86bca4387df/
I have not developed anything for IOS in a long time so please bear with me. Using the Swift language for the first time in XCode 6.3.
I have a pre-existing sqlite database, myDB.sqlite, that I want to import into my project.
I have added the sqlite Framework, added FMDB and the bridging header file and then added the myDB.sqlite file to my project. It is also included in "Copy Bundle Resources".
I am just trying to access myDB.sqlite in my bundle directory to copy it to my Documents directory when the app is run for the first time in the Simulator. However it keeps saying it cannot find the file.
In my AppDelegate.swift:
let dbPath = NSBundle.mainBundle().pathForResource("myDB", ofType:"sqlite")
It keeps telling me that dbPath is nil.
Check the target membership of your SQLite database and it's done:
I've created a Db and created a .edmx file, using Database first approach. In development, I've used "Update model from Database", if any new field added/ size modified. How can i update the model using code like in production environment.
Any Code alternative for updating model, when database changes.
Please suggest me.
In database first approach, you want to create a separate database project (so that the changes won't affect the other projects).
Once database is changed, you just use 'Update model from Database' as you stated.
Then compile the application and copy the database project dll file to production.
Basically, you are just replacing the old dll file with new one.
Note: if your database and web application are in a same project, you'll need to copy the entire dll file.
I have doubt regarding windows phone 8 application development. The database using sqlite for windows phone 8 is pre-loaded into the application or it should be created dynamically at the time of installation in windows phone..? and if it is pre-loaded then how to create the database.db file..?? and also if it is dynamically created, what is the procedure to create dynamically...??
I would say, pre-loaded into the application is the very common way.
Take a look at this article, I think the steps to accomplish your task are quite the same: http://wp.qmatteoq.com/import-an-already-existing-sqlite-database-in-a-windows-8-application/
The first step is to copy your database in to the Visual Studio project and, from the Properties window, set the Build action to Content.
Once you’ve done this operation, you’ll be able to access to the files embedded in your project thanks to the Package.Current.InstalledLocation object that is available in the Windows.ApplicationModel namespace.
The InstalledLocation’s type is StorageFolder, which is the base class of all the folders mapping in WinRT: for this reason, it exposes all the standard methods to interact with the storage, like getting a file or a folder. This way we can use the GetFileAsync method to get a reference to the database embedded into the project and, after that, using the CopyAsync method we can copy it into the local storage of the application. We can copy it in the root of the local storage (like in the following example) or in a specific folder, by getting a reference to it first using the GetFolderAsync method.
For those who are not able to work with sqlite I would like to suggest them to follow this link : http://dotnetslackers.com/articles/silverlight/Windows-Phone-7-Native-Database-Programming-via-Sqlite-Client-for-Windows-Phone.aspx and when you are dumping the data into the project .. you just need to change the properties of the "database1.sqlite" i.e. Build Action = resource . Thats all you need to do ..