Hi I created app with Sqlite. Everything works good but I cant find location of database on my phone.
Next step is to create saving excel files with DB tables...everything works fine, I've created alert to debug and files are creating well.
But I cant find db file and excel file on my phone and even on PC after connecting via USB.
Path to saving everything is:
System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
Ok I found solution for me. I've added code to the MainActivity
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.SetVmPolicy(builder.Build());
Now I try to open xlsx by default app.
Related
Im tring to create a shiny app that read and online onedrive xlsx file and show some things, but for the moment Im unable to read the onedrive xlsx file, I already explore the Microsoft365R and I can conect to my onedrive and I even can open the fil but... what it does is from r open a tab in chrome with the excel file.
I need the file in the local enviroment of r.. this its beacause the shiny app must be deploy in a web server, that every time the app runs it reads the update the file.
library(Microsfot365R)
odb <- get_business_onedrive()
odb$open_file("lcursos.xlsx")
Also this its a business account, so I also have to put the username and key to acces each file, that its beacause use the simple url doesnt work, it says Error 403 FORBIDEEN.
Any ideas?
Thank you so much!
Use the download_file() method to download the file to your local machine:
odb$download_file("lcursos.xlsx")
You can set the location of the download with the dest argument. Once it's downloaded, open it with the xls reader package of your choice. I suggest either openxlsx or readxl.
Note that if your file is password protected, your options are limited. See this question for possible solutions.
Some fields are not loading back in flutter app once I save them and load back.
While saving I am able to see the maps, it is correct only.
So, I want to check that load that sqlite db file.
For that, I kept a text field and ran the emulator.
But, when I ran the same on my mobile, it is not showing the db file path.
Can you explain how to get that file from the mobile(Oneplus 8t)?
in android studio you can see the database by going to : view=>tool windows => database inspector
I have a Flutter/Dart application that I am coding using Android Studio. I use a database called envirodatabase.db with the sqflite package. I want to open the database in DB Browser for SQLite on my computer, but the only way it lets me do that is through saving a copy of the file, not the file itself.
How do I open the original file in DB Browser for SQLite?
Here is my Device File Explorer
What I tried doing was I right clicked > Save As in the Device File Explorer where my app's database was. I saved it to my desktop and opened it, but the changes don't update the original file.
Similar questions with different problems:
Viewing sqlite database file using DB browser for SQlite
Android Studio saves files you open this way in a temporary directory outside of your project. If you make modifications to a file you opened using the Device File Explorer, and would like to save your changes back to the device, you must manually upload the modified version of the file to the device.
https://developer.android.com/studio/debug/device-file-explorer
What I had to do was, back in the Device File Explorer, after saving to Desktop and making changes,
Right click the folder
Click Upload
Select the file with the database changes
(Not sure if this is needed but I did it just to be safe) Right click the folder or file and click synchronize
Hot restart the application (hot reload may also work, but again, just to be safe).
I am trying to include SQLite database in my Windows 8 Store App (HTML/JS). I was following these tutorials:
http://www.youtube.com/watch?feature=player_embedded&v=luV6no8ti6M
http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx
At one point I added following code:
var dbpath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "people.db");
using (var db = new SQLite.SQLiteConnection(dbpath))
{
...
}
After deploying application I get following error:
Could not open database file: C:\Users\...\people.db (CannotOpen)
I looked up this path and file people.db was created, but apparently failed to open. What might be the reason for this?
I have also downloaded source code for this tutorial:
http://www.dzone.com/articles/getting-started-sqlite-windows
and got exact same exception - might there be something wrong with my computer configuration?
Actually your database file is in program files/program files(X86) after deploying your application where you have no rights by default to create, open & update existing file.
you cannot change this rights. As we are only allow to create folder inside the program files/program files(X86) directory.
If you change the directory (Except program files/program files(X86)) while installing then this may work very well.
refer
http://www.dzone.com/articles/getting-started-sqlite-windows
I'm in need of some help in developing a desktop application with a pre-populated database. I have tried numerous ways to get this working including those mentioned on both Tidesdk's API here http://tidesdk.multipart.net/docs/user-dev/generated/#!/api/Ti.Database.DB and at Titanium Desktops old API here http://developer.appcelerator.com/apidoc/desktop/latest/Titanium.Database-module.
While the later (using Titanium not Ti) works in creating a database in the apps directory it does not install my pre-populated sqlite database which is located in the resources file of my app.
A couple of my attempts located below
var db = Titanium.Database.openFile('test_db.sqlite', 'test_db');
var db = Titanium.Database.openFile(Ti.Filesystem.getFile(
Ti.Filesystem.getApplicationDataDirectory(), 'test_db.sqlite'));
var db = Ti.Database.open('test_db');
As stated most of these manage to create a database with the name given but when trying to run something as simple as a db.execute(SELECT) of something I know would exist in my pre-populated db I receive an error stating
Exception executing: SELECT name, id FROM people ORDER BY name COLLATE NOCASE, Error was: SQL Statement invalid or database missing
I have searched high and low for something to answer this but everyone continues to refer to the aforementioned API's or to the Mobile API's Ti.database.install() which does not work either.
Is it possible with titanium desktop to use a pre-populated sqlite database or do I have to populate it after I create it? If so any direction would be helpful (where to place the .sqlite file in the app and what functions to call).
I am currently using Titanium Studio with a titanium desktop osx SDK of 1.2.0.RC4 as requested by tidesdk.org until they have released there open source sdk.
Thanks in advance
This is possible, I just used this feature in a recent desktop app, deployed it successfully to Windows and Mac.
In my experience, sometimes your database file can be corrupted, for example if you use the Titanium.Database.install command, and it cant find the file to preload from (maybe the first time you specified the path wrong for instance), it will create the file itself, any subsequent install commands will not work because it already thinks this database has been installed.
Have you tried clearing out the application data? This is where titanium installs the database. For Mac this is in your /User/Library/Application Support/APPNAME directory. Their is a directory for databases, delete this and try again.
Also, this answer on Titanium Q&A may help, it talks about the process with the Mobile SDK but the Database stuff is the same.
Hope this helps!