sqlite

Android: Loading data from a URL to SQLLite

What's the easiest way to populate a SQLLite table with data off a URL? I'm writing a Delphi web app that will generate a file on a server for my Android app to download. In Delphi, I'll probably save it as a .csv file and use bulk import to import into MS SQL Server. What's the easiest / best practice way to do this in Android? How w...

No such table exception in android

Hi! I have next stuff: private static final String DB_NAME = "MyDebts.db"; private static final String CREATE_DB_QUERY = "CREATE TABLE " + Dao.CONTACTS_TABLE_NAME + " (ContactId varchar(64), Credit integer);\n" + "CREATE TABLE " + Dao.SETTINGS_TABLE_NAME + " (Name varchar(64), Value varchar(64));" ; @Override public...

How to insert a large number of list entries into sqlite statements

Ok, I am using apsw with sqlite, and have a large list of entries.Each entry contains a new row to be inserted. The number of entries is sometimes 20, sometimes 21. Since apsw supports multiple sql statements in curser.execute(), I was wondering if there would be a less confusing way of inserting all my list entries into the database tha...

insert or update confusion

Hi everyone, I'm a bit confused about how to handle the situation where you update a row in sqlite if it exists, or insert it if it doesn't. I seem to see a different solution on every answer there is to this problem. Whats the most efficient or easiest way? EDIT: I meant sqlite, sorry ...

What library is used to access SQLite in my application?

My little SQLite testing application is working, and everything is 100% functioning as expected. For learning purposes, I'd like to know what library is allowing me to communicate with my Scans.db SQLite database. I was told that I'd need the System.Data.SQLite reference, but my application works and I don't see it referenced anywhere. ...

Comparing two SQLite tables for diffs

I have two SQLite tables I want to compare. To set up the tables: CREATE TABLE A (Value); CREATE TABLE B (Value); INSERT INTO A VALUES (1); INSERT INTO A VALUES (1); INSERT INTO B VALUES (2); INSERT INTO B VALUES (1); The closest I got with comparing two tables is using the SQL below: SELECT 'A' AS Diff, * FROM (SELECT * FROM A EXC...

Mysql, SQLite, Scalability

Could SQLite be an alternative for mysql in high traffic web sites? Thanks ...

Will Active Record help me concatenate two strings in a database-neutral way?

I'm adding SQLite support to a Rails 2.3 codebase designed for MySQL. Most of the changes so far have been fairly straightforward, but I've now found some examples like the following code: SomeModel.find(:first, :conditions => ["? LIKE CONCAT(some_attribute, '%')", a_variable] ) I can't just use the ANSI concatenation operator beca...

Can SQLite support this schema?

Hi, imagine I have this table called Department. Each Department can have child Departments. I was thinking of having a column called ParentDepartmentID as foreign key to another department. If this key is null, it means it's a Parent top class department and not child of any other department. I guess you could call this a self referen...

Saving dates in SQLite?

Hello, I've found this from this link: http://www.sqlite.org/datatype3.html 1.2 Date and Time Datatype SQLite does not have a storage class set aside for storing dates and/or times. Instead, the built-in Date And Time Functions of SQLite are capable of storing dates and times as TEXT, REAL, or INTEGER values: TEX...

Android SQL query not ordering data.

Hi There, I have written a small android app that grabs some data and displays it in a ListView. I want to have the list sorted in ascending order (no prob). But when I add a new item it stays at the bottom of the list even when the view/app is reloaded. It seems the only data that is being sorted is the entries that were created in th...

In HTML5, how do I return the results of an SQLite call directly, rather than handing them to a function?

Hello. Using SQLite in HTML5, how do I execute a call such as the following so that it's returned immediately, instead of passing off the result to another function? try { mydb.transaction( function(transaction) { transaction.executeSql( 'SELECT name FROM celebs order by name limit 100 ', [], ...

sqlite3 db is locked

I am on Ubuntu10. Create new db file with touch development.db Want my migrations rake db:migrate but get locked error SQLite3::BusyException: database is locked How it can be locked?! update it can be locked by samba. it's shared folder ...

SQLite vague syntax error

Ok, so I'm putting a list of 25 tuples, with each tuple containing 5 items, into an sqlite database. Each time I try the main code to write, I get "apsw.SQLError: SQLError: near "?": syntax error" Here's the code I'm running. Be aware that this is part of a much, much larger server project for a game, so some of the functions will be unk...

How to use selects in join clauses in Android 2.1?

I have a query that does some magical sort-group-joining that works just fine on Android 2.2 (froyo) version of SQLite: SELECT channels.*, p.* FROM channels LEFT JOIN programs p ON channels._id = p.channel_id JOIN (select p2.channel_id, max(p2.airdate) max_air FROM programs p2 GROUP BY p2.channel_id) pj ON pj.channel_id = p.chan...

Does SQLite work well with Entity Framework?

The reason I ask is because when trying it out, this happens: http://stackoverflow.com/questions/4064814/argumentexception-was-unhandled Both the Data Access Library project and the actual Winforms project use .NET 3.5 and there's this bug that rendered everything to a screeching halt. Maybe I shouldn't use an ORM with SQLite and just...