Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

How do connect to ultralite database that is on my sd card.

asked 16 Apr '12, 13:39

Tejasvi's gravatar image

accept rate: 0%

Something like this will do:

Configuration config = DatabaseManager.createConfigurationFileAndroid(
    "/sdcard/Android/data/", getApplicationContext() );
Connection conn = DatabaseManager.connect( config );

permanent link

answered 16 Apr '12, 13:58

Andy%20Quick's gravatar image

Andy Quick
accept rate: 45%

I tried this but i get this error "com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-954]: The database '/data/data/Tejash.Agni/goroute.udb' was not found" where goroute is my file name and tejash.agni is package in which database is stored

(16 Apr '12, 14:06) Tejasvi
Replies hidden

File paths in the Android file system are case-sensitive. Could that be the problem?

(16 Apr '12, 14:15) Andy Quick

You indicated that you were interested in accessing the database on an SDCard. The error you report looks like an internal file storage reference. A reference to an SDCard location will look more like:


I generally use the following approach in code:

    String dbPath = getApplicationContext().getExternalFilesDir(null)
            + "/database.udb";

For internal storage, the code I use looks like:

    String dbPath = getApplicationContext().getFilesDir()
            + "/database.udb";

and the resulting directory looks like:

(16 Apr '12, 15:05) Chris Keating
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 16 Apr '12, 13:39

question was seen: 2,174 times

last updated: 16 Apr '12, 15:06