[android-developers] Re: running sqlite3 commands from app?

2009-12-02 Thread Ken H
From the looks of it you're going to need to read up on SQLite. This is where I got started: http://www.devx.com/wireless/Article/40842/0/page/1 But to import data to a database in your app, you need to do something like this... SQLiteDatabase db; BufferedReader inFile; String iLine; try{

[android-developers] Re: running sqlite3 commands from app?

2009-12-01 Thread dsukhram
Thanks for your reply. But I have looked at this class and I only see methods for creating,deleting or executing queries on a database. I don't see any methods for issuing a sqlite command. Maybe i'm blind but can you point out a method in this class that i would use? thanks On Nov 30, 4:04 pm,

Re: [android-developers] Re: running sqlite3 commands from app?

2009-12-01 Thread sathya subbiah
Hi, Use execSQLhttp://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#execSQL%28java.lang.String%29provided by Android for executing SQL commands. On Tue, Dec 1, 2009 at 7:50 AM, dsukhram duanesukh...@gmail.com wrote: Thanks for your reply. But I have looked at

[android-developers] Re: running sqlite3 commands from app?

2009-12-01 Thread dsukhram
I tried to run the .tables command using the following: SQLiteDatabase db = this.openOrCreateDatabase(DB_NAME, MODE_PRIVATE, null); db.execSQL(.tables); and I get the following error: ERROR/Database(13071): Failure 1 (near .: syntax error) on 0x1f3f60 when preparing '.tables'. On Dec 1, 8:14 

[android-developers] Re: running sqlite3 commands from app?

2009-12-01 Thread dsukhram
When I try to run the '.tables' command by doing the following: SQLiteDatabase db = this.openOrCreateDatabase(DB_NAME, MODE_PRIVATE, null); db.execSQL(.tables); I get this error: ERROR/Database(13071): Failure 1 (near .: syntax error) on 0x1f3f60 when preparing '.tables'. On Dec 1, 8:14 am,

[android-developers] Re: running sqlite3 commands from app?

2009-12-01 Thread dsukhram
sorry for the double post On Dec 1, 9:32 am, dsukhram duanesukh...@gmail.com wrote: When I try to run the '.tables' command by doing the following: SQLiteDatabase db = this.openOrCreateDatabase(DB_NAME, MODE_PRIVATE, null); db.execSQL(.tables); I get this error: ERROR/Database(13071):

Re: [android-developers] Re: running sqlite3 commands from app?

2009-12-01 Thread Dianne Hackborn
You put -real- SQL in to those. .tables is a meta-command of sqlite3. Please, forget about the sqlite3 command, that is only for debugging from the command line. You can accomplish everything with the Java API. You probably want to get a sqlite3 manual to help you with the command syntax. On

Re: [android-developers] Re: running sqlite3 commands from app?

2009-12-01 Thread chad ziccardi
On Dec 1, 2009, at 9:32 AM, dsukhram wrote: When I try to run the '.tables' command by doing the following: SQLiteDatabase db = this.openOrCreateDatabase(DB_NAME, MODE_PRIVATE, null); db.execSQL(.tables); Try this: db.execSQL(SELECT name FROM sqlite_master where type='table' and name

[android-developers] Re: running sqlite3 commands from app?

2009-12-01 Thread dsukhram
Thanks for your reply Chad. However I was just using the '.tables' command as an example. What I really need to do is run the '.read' command in order to load data into my db On Dec 1, 1:21 pm, chad ziccardi c...@digitalfreaks.org wrote: On Dec 1, 2009, at 9:32 AM, dsukhram wrote: When I try

[android-developers] Re: running sqlite3 commands from app?

2009-11-30 Thread dsukhram
Well thats the question i'm asking. I've looked at a various classes under the android.database.sqlite package but I can't seem to find one to do what I want. Can you tell me which one I need to use? On Nov 30, 2:57 pm, Dianne Hackborn hack...@android.com wrote: Why would you want to do that?  

Re: [android-developers] Re: running sqlite3 commands from app?

2009-11-30 Thread Dianne Hackborn
http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#execSQL(java.lang.String, java.lang.Object[]) On Mon, Nov 30, 2009 at 12:37 PM, dsukhram duanesukh...@gmail.com wrote: Well thats the question i'm asking. I've looked at a various classes under the