sqlite

How do I create a table trigger with DBD::SQLite?

Can anyone provide syntax to create a table trigger preferably with DBI's do() method. It doesn't seem to like me putting everything on one line. Not sure what i'm doing wrong. Here's what I've got: $dbh->do("CREATE TABLE image(img_id integer primary key, md5sum text, path text, name text, date DATE)"); $dbh->do("CREATE TRIGGER insert_i...

Loading a CSV into Core Data managed sqlite db

I have a CSV file containing data. I want to load it into a Core Data managed sqlite db. I just ran one of the sample Core Data Xcode apps and noticed it created the db file. I noticed table names all started with Z and the primary keys were stored in separate table so from this am I right in presuming that just importing the CSV data d...

Export Awesomebar history in Firefox

Is there any way to export the history information from the Firefox address bar into a file? I have been searching for docs online, but cannot find a solution. Thanks! ...

Wordpress with JQuery with PHP Service Endpoint with SQLite

I am using Wordpress with JQuery to create a vehicle selection form. Vehicle information is retrieved by JQuery Ajax calls to a PHP backend script. The PHP scripts query an SQLite database for vehicle information. Wordpress form -> JQuery get -> PHP script -> SQLite DB I have three distinct queries that need to be executed: Vehicle...

Search display controller and sqlite

Hi. I am a n00b on iPhone programming, and I am currently experimenting with the uisearchdisplay controller i have downloaded Apples example. I tried to modify it by using a sqlite query to load the tableview. However egen i search for a keywoed using the search bar, no resulta show up. Whatever Willy be the correct way of searching a s...

Yet another "could not load file or assembly ... or one of its dependencies. The system cannot find the file specified"

...

CoreData fetch request through abstract managed object to concrete managed object

Hi all, I'm trying to execute a fetch request against a Managed Object Context with a predicate that tests against a keypath that exists in some subclasses of an abstract class. For example here is a part of the object model Library::NSManagedObject - AllMovies::to-many relationship->Movie Movie::NSManagedObject (abstract) - type:...

Duplicate Insertions in Database using sqlite, sqlalchemy, python

I am learning Python and, through the help of online resources and people on this site, am getting the hang of it. In this first script of mine, in which I'm parsing Twitter RSS feed entries and inserting the results into a database, there is one remaining problem that I cannot fix. Namely, duplicate entries are being inserted into one o...

Archiver Securing SQLite Data without using Encryption on iPhone

I'm developing an iphone app that uses Core Data with a SQLite data store and lots of images in the resource bundle. I want a "simple" way to obfuscate the file structure of the SQLite database and the image files to prevent the casual hacker/unscrupulous developer from gaining access to them. When the app is deployed, the database file ...

What are good open source GUI SQLite database managers?

Is there any good open source SQLite database manager around? I am using sqlitebrowser now but I have to say the interface is not really friendly so I am looking for something better. ...

How can I define my custom collate in Sqlite (in Objective-C) (for iPhone)

I need to define an arbitrary comparison method for sqlite in code. I need to be able to search for "e" and find both "e" and "é" (this is an example and the actual characters are in Persian). any help appreciated. ...

Can/should I run my web site against a SQLite database?

I'm about to build a new personal blog/portfolio site (which will be written in ASP.NET), and I'm going to run it against a SQLite database. There are a few reasons for this: The site will not be getting a lot of traffic, and from what I've read, SQLite is able to support quite a lot of concurrent users for reading anyway I can back up...

Can I have negative tinyint in SQLite?

Hi, I need to create a table (in SQLite) with a column which contains either "-1" or "+1". To save memory it is better not to use "int" as a type of the column. So, I thought about "smallint" and "tinyint". But smallint is not so small (from -32,768 to 32,767) and tinyint can be only positive (from 0 to 255). Are there any other options ...

Where does Android emulator store SQLite database?

Hi folks, I'm working on an Android application that stores data in a SQLite database. My question is, where does this database file get stored on the filesystem when you're using an emulator? I have seen that it's stored in /data/data/package_name/databases but I need to know where on my local machine's hard drive that actually ma...

nHibernate & sqlite mappings

I'm having real problems with setting up nHibernate with sqlite. Here is the hibernate.cfg.xml file: <?xml version="1.0" encoding="utf-8" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <prope...

Error: file is encrypted or is not a database

Hi, I used PHP to create a database with a table. I did it in the following way: <?php $db = new SQLiteDatabase("test.db"); unset($db); $db = sqlite_open("test.db"); sqlite_query($db,"create table students (names char(255))"); sqlite_close($db); ?> After I execute my PHP file from the command line: "php test.php" I get a new file in m...

model classes in a database with my own enum types

Hi, I have an application that I need to query lifetables (for insurance calculation). I was thinking about using XML to store the data, but thought it was a little big, but maybe a little small for using a full-fledged database. So I chose to use SQLite. In my application, I have enums defining a few different things. For example, GEN...

Edit application database in android

How can I edit an SQLite database after it has been created and stored on my phone together with the corresponding app? I want to add a new column to the database but I can't figure out how. Is it possible to do this via the adb shell or maybe eclipse? Or in code? I tried to just update my db-adapter class, but then the app fails at com...

Anatomy of a Distributed System in PHP

I've a problem which is giving me some hard time trying to figure it out the ideal solution and, to better explain it, I'm going to expose my scenario here. I've a server that will receive orders from several clients. Each client will submit a set of recurring tasks that should be executed at some specified intervals, eg.: cl...

Is it possible to save a list of values into a SQLite column?

I want 3 columns to have 9 different values, like a list in Python. Is it possible? If not in SQLite, then on another database engine? ...