SQLite connection failed

Mobile Testing, Android App Testing.
lucian.teodorescu
Posts: 82
Joined: Fri Oct 24, 2014 10:58 am
Location: Bucharest

SQLite connection failed

Post by lucian.teodorescu » Wed May 27, 2015 2:39 pm

Hi,

I am trying (via user code) to connect to a mobile database.

Since it is android app database, I need to open it with SQlite. So I've referenced System.Data.SQLite (latest version) to my solution, wrote the code below and tried to see how it works.

Code: Select all

public void databasetest()
        {
   	
        	SQLiteConnection m_dbConnection;
        	m_dbConnection = new SQLiteConnection("Data Source=\\\\192.xxx.xx.xxx:5555\\data\\data\\MyApp\\sqlite_db\\AUTOMATICTEST\\W1579_W2PR_QA_R13.db;Version=0;");
        	//m_dbConnection = new SQLiteConnection("Data Source=L:\\Lucian\\workspace\\W1579_W2PR_QA_R13.db;Version=0;");
        	m_dbConnection.Open();
        	
        	string sql = "select * from SSS_CUSTOMER WHERE customer_number01 = 90685";
        	SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection);
        	Report.Info("Info",sql);
        }
Unfortunately, I get the following error :

Only SQLite Version 3 is supported at this time
at System.Data.SQLite.SQLiteConnection.Open() at MyAppTests.Recordings.TEMP.databasetest() at MyAppTests.Recordings.TEMP.Ranorex.Core.Testing.ITestModule.Run() at Ranorex.Core.Testing.TestSuiteModule.RunInternal(DataContext parentDataContext)


Ranorex Version 5.3.2
Virtual device: Genymotion Android emulator
SQLite version on emulator: 3.7.11

What could be the reason for this error?
Any thoughts on how to test against android database?

Thanks!
Lucian Teodorescu
NetSun Software

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: SQLite connection failed

Post by krstcs » Wed May 27, 2015 3:12 pm

This is a SQLite/.NET issue, and likely has nothing to do with Ranorex except that you are using Ranorex to run the tests. I would suggest looking at the SQLite site to figure out the issue, you will probably have more luck there than here.
Shortcuts usually aren't...