react-native-sqlite-storage icon indicating copy to clipboard operation
react-native-sqlite-storage copied to clipboard

Database empty in specific cases

Open rochapablo opened this issue 8 years ago • 4 comments

I'm working with the follow configuration

{ name: 'db', createFromLocation: 'mydatabase.db' }

And so far woking. The problem is when I open the file using SQLiteStudio for example, the database it's empty.

I would like to keep a backup from my database, so I'm using react-native-fs to copy the database file, but when I read the file it shows (0 size)

What could I be doing wrong, that I can't get the real data?

rochapablo avatar Nov 13 '17 22:11 rochapablo

having the same problem

barend4i avatar Nov 30 '17 06:11 barend4i

Sorry for delayed reponse. I need more details..can't do much with info you provided.

andpor avatar May 18 '18 09:05 andpor

This is the doc about opening database using pre-populated asset. See doc.

Which database is empty for you/

andpor avatar May 18 '18 17:05 andpor

I'm working with the follow configuration

{ name: 'db', createFromLocation: 'mydatabase.db' }

And so far woking. The problem is when I open the file using SQLiteStudio for example, the database it's empty.

I would like to keep a backup from my database, so I'm using react-native-fs to copy the database file, but when I read the file it shows (0 size)

What could I be doing wrong, that I can't get the real data?

I have the same problem, did you have a fix?

bachngocnhat avatar Jun 15 '22 07:06 bachngocnhat