sqlite

SQL Query: How to determine "Seen during N hour" if given two DateTime time stamps?

Hello all. I'm writing a statistics based application off a SQLite database. There is a table which records when users Login and Logout (SessionStart, SessionEnd DateTimes). What i'm looking for is a query that can show what hours user have been logged in, in sort of a line graph way- so between the hours of 12:00 and 1:00AM there we...

Step-by-step help and guidance

Is there such a thing as a paid (or free would be GREAT, but unlikely I'm thinking) resource that could help a newbie with guidance and help as I create my first app (C# with SQLite db)? Stackoverflow is great, but a one-on-one person who was familiar with exactly what I'm doing would be even better. Update I'm not looking for traini...

Sqlite + Java: table not updating

I'm using a Java wrapper for SQLite called SQLiteJDBC - this may have some bearing on any answers... I have a table which I've displayed in a GUI, within that UI I have a button for the fields for an individual row of that table. When I save my changes I do this... Statement stmt = connection.createStatement(); stmt.execute("update 'ta...

List Attached Databases using a SELECT command in SQLite

Is there a SELECT command that can list all attached databases similar to the .database command available in sqlite3? ...

Looking for advice on importing large dataset in sqlite and Cocoa/Objective-C

I have a fairly large hierarchical dataset I'm importing. The total size of the database after import is about 270MB in sqlite. My current method works, but I know I'm hogging memory as I do it. For instance, if I run with Zombies, my system freezes up (although it will execute just fine if I don't use that Instrument). I was hoping for ...

Problem with sqlite database on android platform

hi all i am developing an application which uses sqlite db for storing records. I am developing this application on SDK 1.5.. when i test the application on 1.5 device it works good but when i try to run it on a 1.6 device i get a force close message with following logcat output: 03-19 09:31:35.206: ERROR/AndroidRuntime(224): Uncaught ...

Create tables for a dictionary?

I'm making a dictionary database in SQLite and need some tips. My SQL is a bit rusty ;) Would you consider this good SQL? It's done with Java JDBC. This is for creating the tables. CREATE TABLE word ( id INTEGER, entry STRING, pos STRING ); CREATE TABLE translation ( word_id INTEGER REFERENCES word(id), entry STRING ); And when f...

Problem with cascade delete using Entity Framework and System.Data.SQLite

I have a SQLite DB that is set up so when I delete a Person the delete is cascaded. This works fine when I manually delete a Person (all records that reference the PersonID are deleted). But when I use Entity Framework to delete the Person I get an error: System.InvalidOperationException: The operation failed: The relationship could no...

How can I get SQLite to work in C#

Hi everyone I have installed SQLite and am using the wrapper from: http://sqlite.phxsoftware.com/ I have created my database and table in the server explorer in VS2010 but when I create the connection, I don't understand what to do from there and how to get it to work. Can someone provide code examples on how to connect to a db, get a...

SQLite Bulk Import

I am sure there is no easy way to do this but I have ~400 excel files containing data. Each excel file contains the same headers. Is there an easy way of bulk inserting all 400 files at one time or in some form of batch process instead of doing in manually? Thanks. ...

Remote SQLite manager

Does someone know of a Sqlite manager that I can put on my site, so that I can access it over the web and create/edit SQlite databases. I guess something like phpMyAdmin for MySQL. ...

Finisar SQLite Problem with ParameterDirection

private int GetNextId() { SQLiteConnector conn = new SQLiteConnector(false); conn.OpenConnection(); cmd = new SQLiteCommand("SELECT @id_account = MAX(id_account) FROM account"); SQLiteParameter param = new SQLiteParameter("@id_account", DbType.Int32); param.Direction = ParameterDirection.Output; cmd.Parameters.Add...

SQLiteQueryBuilder.buildQuery not using selectArgs?

Alright, I'm trying to query a sqlite database. I was trying to be good and use the query method of SQLiteDatabase and pass in the values in the selectArgs parameter to ensure everything got properly escaped, but it wouldn't work. I never got any rows returned (no errors, either). I started getting curious about the SQL that this genera...

Exception using SQLiteDataReader

I'm making a Custom SQLite Wrapper. This is meant to allow a presistent connection to a database. However, I receive an exception when calling this function twice. public Boolean DatabaseConnected(string databasePath) { bool exists = false; if (ConnectionOpen()) { this.Command.CommandText = string.Format(DATABASE_Q...

How to get contacts in order of their upcoming birthdays?

I have code to read contact details and to read birthdays. But how do I get a list of contacts in order of their upcoming birthday? For a single contact identified by id, I get details and birthday like this: Cursor c = null; try { Uri uri = ContentUris.withAppendedId( ContactsContract.Contacts.CONTENT_URI, id); c = ctx.ge...

Detect the FTS3 extension in SQLite3

What is the SQLite query to detect if the FTS3 extension module is installed? Or is it possible to get a list of installed extensions with an SQLite3 query? It has to work with pysqlite2. I know that I can get the list of tables using SELECT * FROM sqlite_master, I'd like to get something similar for the list of extensions. I also know ...

Get records from a specific month using SQLite

How would I write a SQLite query to select all records from a specific month? My dates are stored as Unix timestamps. PHP code is allowed in your solution if it's required. SQLite2-compatible queries only, please. :) ...

Tutorials for .NET database app using SQLite

I have some MS Access experience, and had a class on console c++ apps, now I am trying to develop my first program. It's a little C# db app. I have the db tables and columns planned and keyed into VS, but that's where I'm stuck. I'm needing C#/VS tutorials that will guide me on configuring relationships, datatyping, etc, on the db so I...

simple tutorial on how to use sqllite

I'm using VB.NET and MSSQL 2005 to create an application. I was told I should rather use SQLite as I want my application to be a standalone one with embedded database. Can someone please provide me with a step to step tutorial on how to create a standalone application with an embedded database? Sorry, I'm quite new to this. Thanks for r...

Matching day in datetime field from sqlite

In Ruby on Rails I'm doing something like: Appointment.find( :first, :conditions => "staff_id = #{staff_id} AND datetimefield = #{datetime}") ... where datetimefield is of course, a datetime field. But, I only want rows where the date is equal to a given day, say 2/12/2011. I don't care about the time. What's an easy way to do this? ...