Android Database Creation
<p>i have created a class for creating database in android, but there are some compilation errors in this.....
I am not able to identify why these errors are coming.. My Code is</p>

<pre><code>public DbHelper(Context ctx) { 
        try {
            db = ctx.openDatabase(DATABASE_NAME,null);
        } catch (FileNotFoundException e) {
            try {
                db =
                    ctx.createDatabase(DATABASE_NAME, DATABASE_VERSION, 0,
                        null);
                db.execSQL(DATABASE_CREATE);
            } catch (FileNotFoundException e1) {
                db = null;
            }
        }
    }
</code></pre>

<p>When i am opening database with "Context" object , it is giving me error that "openDatabase" method is undefined.  ?</p>
