开发者

Opening Sqlite Db on command prompt

开发者 https://www.devze.com 2023-01-10 04:06 出处:网络
Friends, I am working on Sqlite DB and I want to open, view or create databases through the ADB shell command.

Friends, I am working on Sqlite DB and I want to open, view or create databases through the ADB shell command. I've w开发者_开发百科ritten the following commands in command prompt

  1. cd C:\android-sdk_r04-windows\android-sdk-windows\tools>
  2. adb shell

I get a $ after step 2. Any idea how I can get sqlite> prompt instead and perform the following task?

Suppose I want to view the databases. I've written cd/data/data/(mypackage)/databases sqlite3 (database)... after the $ but it says 'Database not found.' How can I view the databases executed through my code?

Thanks in advance.


You can use sqlite3 command to connect to database from adb shell. Find example of sqlite3 form Android Developers. This will open an sql prompt where you can execute standard commands supported. Another link which explains creating a database, creating table and viewing its contents all from command prompt (adb shell) is here.

0

精彩评论

暂无评论...
验证码 换一张
取 消