sqlite

Export sqlite table using php

Hi, Im just getting started with PHP, and I need to export a table from my sqlite database to a CSV or ideally XLS. I have found an example using mysql, but i cant convert it to work with sqlite. Here is what i have so far: <?php $db = new PDO('sqlite:../ccm.sqlite'); $query = $db->query('SELECT * FROM Emails'); $export = sqlite...

System.Data.SQLite Table not found

I can insert/update/delete fine from tables like product and such but this code fails with saying that the table AppAttribute does not exist. As I said, other tables are working fine... ExecuteNonQuery(BuildCommand(string.Format("DELETE FROM AppAttribute WHERE ProjectId={0};", ID))); ExecuteNonQuery(BuildCommand(string.Format("D...

asp.net in process memory, sqlite?

Has anyone used SQLite before with asp.net? Is there a SQLite Linq provider? Do you recommend something other than SQLite? Would like to hear your thoughts. Will this work as the master database and then backup to a sql server 2005 db? Can you run a hybrid of the two? ...

Optimal approach to displaying a large tableview in iPad

We need to display a tableview with over 400 rows and each row needs to display data worth 12 days' all time slots. The data is added as buttons to each of tableview rows inside a scroll view and the data is read from database. There are number of issues we are facing: slow scrolling since data is fetched for every cell as the table sc...

No memory for Sqlite statement

Hello, I am facing the following dilemma . I am using core data for database Operations. I have the following code . *const char *sql = "SELECT id, title, data, size, red_comp, green_comp, blue_comp FROM DrawingInforec"; sqlite3_stmt *statement; if (sqlite3_prepare_v2(database, sql, -1, &statement, NULL) != SQLITE_OK) { NSLo...

Multiple COUNT in 1 SQLITE Query

Using SQLite. SELECT c.*, COUNT(m.course_id) AS "meeting_count", COUNT(r.meeting_id) AS "race_count" FROM course c LEFT JOIN meeting m ON m.course_id = c.id LEFT JOIN race r ON r.meeting_id = m.id GROUP BY c.id Course has meetings has races. Trying to select the correct count for course meetings and cours...

SQLite Crash on Inserting Items

I have three queries that I'm running through SQLite. These are what I'm running; the first is the table declaration and then the next 3 are the actual queries. Declaration: "CREATE TABLE IF NOT EXISTS items (busid INTEGER PRIMARY KEY, ipaddr TEXT, time TEXT DEFAULT (NOW()));" Queries: (Works) "INSERT INTO items (time, i...

android db or xml/kml?

Which is favourable, efficient and faster? storing information in xml format and retrieving it or storing information in a db on android? and also, in terms of portability, xml could be stored as an asset...can the same be done with db? do db come in as default package in all phones. application involves dealing with over 1000 records ...

SQLite drop column routine

I need to write a DROP COLUMN routine for manipulating SQLite databases. It would be called something like this: dropColumn("SomeTable", "SomeColumn"); The SQLite FAQ says that to drop a column, you have to create a temporary table containing just the columns you want, and then copy the data across to it, and then rename it. It shou...

Inserting SQL Data into Linked (Foreign Key) Tables in SQLite

I have two tables linked by a foreign key. Example: "CREATE TABLE one (id INTEGER PRIMARY KEY, data REAL, time TEXT NOT NULL DEFAULT (datetime('now')));" "CREATE TABLE two (id INTEGER PRIMARY KEY, parent INTEGER, CONSTRAINT fc_two FOREIGN KEY (parent) REFERENCES one(id));" So I'd like to do an INSERT INTO with an embedded JOI...

Easiest way to recast variables in SQLite

New to databasing, so please let me know if I'm going about this entirely wrong. I want to use databases to store large datasets (I use R to analyze data, which cannot load datasets larger than available RAM) and and I'm using SQLite-Manager in FireFox to import .csv files. 99% of the time I use reals, but would like to avoid all the ...

Android problem using built in SQLiteDatabase execSQL to update function

I have the following code to open a database on the SDCARD and then update a value. If I run the code as is, it will generally run through without throwing an error but nothing gets updated. If I single step through each line, it works perfectly. I have also tried adding SystemClock.Sleep(2000) in between each statement. Still, it do...

OpenFileDialog->DialogShow() results cause errors in SQLite

I have a program that accesses a database using SQLite. When I open a OpenFileDialog or a SaveFileDialog before I do the SQLite call: result = sqlite3_prepare_v2(databaseConnection,converted,10000,&stmt,&strptr); and choose "Cancel", everything works okay (result == SQLITE_OK) but when I choose "Open", even if I don't do anything with...

SQLite update in MacOSX

I have SQLite 3.6.7 and i wanted to update it. Can any one say how to update my SQLite to the latest version step by step ... Im developing OS X apps for this im using SQLite 3.6.7 ...But I came to know that i cant directly use foreign keys so i want to update my SQLite to the latest version ... Can any one help me out with this by men...

sqlite subqueries with group_concat as columns in select statements

I have two tables, one contains a list of items which is called watch_list with some important attributes and the other is just a list of prices which is called price_history. What I would like to do is group together 10 of the lowest prices into a single column with a group_concat operation and then create a row with item attributes fro...

How to work with Sqlite?

I want to setup different rails versions with RVM. However, working with the SQLite gives problem. First, doing gem list -ra sqlite gives *** REMOTE GEMS *** sqlite-foreigner (0.5.0) sqlite-ruby (2.2.3 ruby mswin32, 2.2.2 ruby mswin32, 2.2.1 ruby mswin32, 2.2.0 ruby mswin32, 2.1.0 ruby mswin32, 2.0.3) sqlite3 (0.1.1, 0.1.0, 0.0.8...

Update database

Hi at all, I have a little question, I have a simple app that read a database and display some data, all the app work perfectly but when I change my database from mac and I rebuild&go the database is the old database, not the new. For have the new I have to delete app from simulator (or itouch) and re-build...Where is the mistake?Can you...

Creating a simple multi-user desktop application

I'm working on a simple mark management system for a school department (let's assume it's the Maths department). They want a simple system for users to enter marks for each student as they progress, entering marks for each term, getting yearly averages, sorting by teacher, etc. Speaking to the person in-charge of the department, he said...

upload video in sqlite...in iphone

is it possible to upload video in sqlite not the url ? hi iam new to the iphone ... i want to upload video in sqlite not the url of video. i have tried it but not got the sucess if any one know the solution plz post the answer.. ...

How to install sqlite from source on Mac?

I have seen this question on the source code of SQLite. However, I can not make sense on how to build SQLite on my Mac OS 10.6 from scratch, esp. an old version. What steps do I need? ...