lets start by saying I did mange to take data and on my application
make it into data base and use this database
but my problem is that I want to take db from outside and use this db
in my application i made a java sql db(it works couse i browsed it on
sqlight browser )
this one is the code in my android application where i want to use the
db i inserted earlyer into my app databases
************************************************************
myPath = "/data/data/com.myAppName/databases/myAppDataBase.db";
db = SQLiteDatabase.openDatabase(myPath, null,
SQLiteDatabase.NO_LOCALIZED_COLLATORS);
************************************************************
and my query is :
Cursor cursor = db.query(TABLE_NAME, new String[] {LETTER},LETTER+ "
like " + "'%" + "I" +"%'", null, null, null, null);
where in order to check i do :
if ( !cursor.moveToFirst())
existInDataBaseVal = false;
the way I declare on this database in my java who genrate
alredyMadeInJavaDB.db file (i placed it under database in my app):
Class.forName("org.sqlite.JDBC");
Connection conn =
DriverManager.getConnection("jdbc:sqlite:myAppDataBase.db");
Statement stat = conn.createStatement();
stat.executeUpdate("create table "+TABLE_NAME+" ("+VALUE+","+TYPE
+","+LETTER+");");
PreparedStatement prep = conn.prepareStatement("insert into
"+TABLE_NAME+" values
can somone please help me :)
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en