sqlite

[sqlite] Selecting data from two tables

Hi there, I have a SQL table which has an ID column and some other columns. The second table has also ID column. Now I want to insert into second table rows from first table, but only those that don't appear in it already. I want the second table to be "a sum" of both, but without duplicates. The first one is labels and the second is t...

Select query with no duplicate "First Letter" in sqlite

How can I select data with no duplicate the "First Letter" value? My table has a column named "title_raw" with data arrange follow "A, B, C, ..." I want my data display something like this Select (title_raw no duplicate first letter) from SONGS ...

iphone memory leak with uitableview and sqlite

Hi All, I am having a problem with what I believe is a memory leak which after some time is causing my app to slow down. I have a sectioned uitableview that has sections of 'movie directors' with rows of thier movies in their particular section. To do this I am calling a data object (and passing it the section header) to return that se...

Making a distribultable standalone program in PHP

Hello, I've decided to code some applications in PHP that are supposed to run offline in the user's machine. However, I can't seem to find an user-friendly install wizard to create a local server in where the script will run. Any ideas? PS: Here's an example of what I want: http://www.nolapro.com ...

How to use buildout to create localized version of my project?

Hi, I am trying to create a localized version of my project. I started from the following: mkdir my cd my wget http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py After the last command I get the following message: Warning: wildcards not supported in HTTP. --08:42:17-- http://svn.zope.org/checkout/zc.buil...

Create Records with Linq to SQLite via DbLinq

I have (after some significant effort) gotten DbLinq working with the latest build of Mono on OS X. Has anybody successfulyl created database entities via DbLinq/Sqlite? For example, I have the following table: CREATE TABLE UserType ( id integer primary key, description text ) I have generated my *.cs file and am using the f...

Why my python does not see pysqlite?

I would like to have an interface between Python and sqlite. Both are installed on the machine. I had an old version of Python (2.4.3). So, pysqlite was not included by default. First, I tried to solve this problem by installing pysqlite but I did not succeed in this direction. My second attempt to solve the problem was to install a new ...

Modifying a SQLLite database schema and data via SubSonic 3 within a transaction

I'm using Visual Studio 2008, C#, SQLite via System.Data.SQLite with SubSonic 3. My application has gotten to a state where I need to upgrade the database schema (add columns, triggers, etc) then add new records via SubSonic generated ActiveRecord objects - all within the scope of a single transaction so that any failures could be nicel...

How to get _sqlite3.so file?

I have installed Python 2.6.2.. I did it "locally" since I do not have root permissions. With this version of Python I wanted to use module called "sqlite3" (it is called "pysqlite" in earlier versions). In theory I had to be able to use this module without any problems since it is supposed to be included by default in the considered ve...

How do I access an SQLite database in Clojure?

(ns db-example (:use [clojure.contrib.sql :only (with-connection with-query-results)] ) (:import (java.sql DriverManager))) ;; need this to load the sqlite3 driver (as a side effect of evaluating the expression) (Class/forName "org.sqlite.JDBC") (def +db-path+ "...") (def +db-specs+ {:classname "org.sqlite.JDBC", ...

How can I make Python see sqlite?

I cannot use sqlite3 (build python package). The reason of that is missing _sqlite3.so file. I found that peoples had the same problem and they resolved it here. To solve my problem I have to "install sqlite3 and recompile Python". I also found out that the problem can be solved by "building from source and moving the library to /usr/lib...

What is a difference between "sqlite" and "pysqlite2/sqlite3" modules?

I gave up to make "sqlite3" working but I just found out (with help("modules")) that I have "sqlite" module. I tested it (create table, insert some values and so on) and it works fine. But before I start to use this module I would like to know if it has some significant limitations in comparison with sqlite3 module? Can anybody, pleas, g...

Why I cannot build a chain of methods? (method1.method2.method3)

If I have the following code: import sqlite sqlite.connect('tmp.db').cursor().close() I get the following error message: Traceback (most recent call last): File "searchengine2.py", line 13, in ? sqlite.connect('tmp.db').cursor().close() File "/usr/lib64/python2.4/site-packages/sqlite/main.py", line 280, in close if self.c...

How to compile a dynamic library?

Hi, I've been searching the web for a couple of days and can't seem to find clear instructions on how to do this. SQLite doesn't have math functions like, sine, cosine, etc.. I found a library that extends SQLite and adds these functions, but I can't figure out how to compile the library. http://lhealy.livejournal.com/6306.html I've ...

How much memory does the prepared sqlite statements consumes in iPhone?

Hi, I am using sqlite database and I have around 15-20 queries I need to communicate database and extract data. What I am doing is preparing this querry while the allocation of an DBPersistence Object which takes care of communication with the database. This DBpersistence is a singleton class. My runtime memory consumption is almost 3...

sqlite - temporary data in memory

hi, my situation: i have a file based sqlite db and want to have all temporary stuff done in memory (temp databases for large queries, etc). i tried using the PRAGMA temp_store = 2 command, but i am not 100% sure if it really does what i want. the strange thing is that while debugging i still reach the function winGetTempname which open...

SQLite on iPhone - Techniques for tracking down multithreading-related bugs

Hey guys, I'm working with an Objective-C wrapper around SQLite that I didn't write, and documentation is sparse... It's not FMDB. The people writing this wrapper weren't aware of FMDB when writing this code. It seems that the code is suffering from a bug where database connections are being accessed from multiple threads -- which a...

How to improve performance on SQLite3 iPhone program

I am (still) working on an iPhone program which uses SQLite3. I have managed to optimize the database writes as far as I can. The problem I have now is that "END TRANSACTION" is killing me as it's taking very long. The journal file is usually about 50k which might be a problem, but I'd like to know your ideas. I tried using "PRAGMA sy...

Best method for saving values of a queue in case of program failure

Say I have a multithreaded application made up of two separate threads and a Queue. Thread 1 finishes it's computation and puts the result in the Queue. Meanwhile thread 2 is constantly looping and checking if there is any data in the Queue for it to process. How can I save the values in the queue to disk temporarily in case the for so...

Slaves working for Masters - Distributing Jobs

For a new project that I'm working on I need to set up a centralized computing environment with a primary server (master) and several workstations (slaves). The master will recieve several types of job orders with diferent intervals and expiration dates, example: NAME INTERVAL EXPIRATION OPERATIONS Job A 5 m ...