sqlite

SQLite Int64 vs Int32 Problem and SubSonic ActiveRecord

I thought this was covered elsewhere but I don't see it now. Anyway, having a problem with a simple v3 query. Using SQLite ADO.NET provider 1.0.65.0. My table structure looks like this: CREATE TABLE "SamplerData" ("RowId" INT PRIMARY KEY NOT NULL ,"SampName" VARCHAR(128),"SampPurpose" VARCHAR(2048),"ActiveState" INTEGER NOT NULL DEFAU...

How many SQL queries do I need?

I have a database table (sqlite) containing items that form a tree hierarchy. Each item has an id field (for itself) and a parentId for its parent. Now given an item, I must retrieve the whole chain from the root to the item. Basically the algorithm in pseudocode looks like: cursor is item retrieve parentItem for cursor by parentId if...

How can I get some more RDBMS features but still use SQLite?

I've decided to use SQLite for my personal development project, because it just sprung up out of my computer seemingly of its own volition and I wanted to learn more about it. The problem is, I'm starting to really miss a lot of the features I'm accustomed to with heavyweight RDBMS's: stored programs, constraints, DRI, complex datatypes ...

iPhone SQLlite commands with apostrophes

I'm writing an application for the iPhone that communicates with a SQLite database but I'm running into a small problem. Whenever I try to query information based on a condition that contains an apostrophe, no results are returned.... even if a result that matches the requested condition exists. Let me give some specifics... SQLite Ta...

Adding sqlite framework to desktop Mac app.

I'm using Xcode 3.1.3 to create a desktop Mac OS X 10.5.7 app. I'd like to use sqlite in the app but can't find the framework reference in the MacOSX10.5.sdk folder. I've used sqlite in iPhone apps and the reference comes from the iPhone sdk folders. Should I just reference the iPhone sqlite framework version or is the desktop version...

Convert Sqlite BigInt to Date

I have a Sqlite database that I am using as an ado.net job store for my Quartz.net scheduler jobs. In one table, a column called START_TIME is of type big int. Is there a way to cast or convert a bigint to a date value? I would like to be able to query the database to see which jobs are scheduled at what date/time and a value such as...

SQLiteJDBC and PreparedStatement to use pragma table_info

I'm utilizing Java and SQLiteJDBC to work with SQLite. I need to access name of columns for a given table and I've found that I could accomplish this with the following command: pragma table_info(myTable) However, when attempting to do the following I get an error. PreparedStatement _pstmt = this._DBConnection.prepareStatement("pragm...

Problem in adding values to the database when apps will terminate

Hi, I have to save my application data so i am adding all the database while application quit and when apps open, i am retrieving all the records. It works perfect only for two times means first apps installed, it will save data for app termination 1 and apps termination 2. But then after it doesn't save my data to the database or thi...

How do I access SQLite from VBA?

I have an Excel workbook that has some adodb code that queries a local access database. I want to do the same for SQLite as I believe that will provide better performance. How do I do that? Can I connect to an SQLite file using adodb or odbc? I need something simple that I can deploy so that if i can minimize unnecessary configuration a...

What should I do to refresh data with concurrent sqlite 3 access

I have two sqlite windows clients concurrently using a sqlite 3 base on the network. When one appends data the record is successfully appended (there's no the journal file at the moment). But another client doesn't see this record even when a fresh SELECT query is fired and starts to see this record of this table after some SELECT querie...

Split Twitter RSS string using Python

Hi, I am trying to parse Twitter RSS feeds and put the information in a sqlite database, using Python. Here's an example: u'MiamiPete: today\'s "Last Call" is now up http://bit.ly/MGDzu #stocks #stockmarket #finance #money' What I want to do is create one column for the main content ("Miami Pete....now up)", one column for the URL ("ht...

django tutorial problem: no module named pysqlite2

hi, Im following the django tutorial from http://docs.djangoproject.com/en/dev/intro/tutorial01/ but I have a problem at step:python manage.py sql polls django.core.exceptions.ImproperlyConfiguraed:Error loading pysqlite2 module: No module named pysqlite2 My system is windows vista,and python version 2.5 django version 1.1 only thi...

sqlite3 bulk insert from C?

I came across the .import command to do this (bulk insert), but is there a query version of this which I can execute using sqlite3_exec(). I would just like to copy a small text file contents into a table. A query version of this one below, ".import demotab.txt mytable" ...

Insert Records into Sqlite DB using ADO.NET Entity Framework?

I'm tring to insert some records into my Sqlite database using the Entity Framework. I do not have a problem connecting to the database or mapping to the database. At least, I don't think I do. When I call "SaveChanges" an exception is fired that states: Unable to update the EntitySet 'RawReadings' because it has a DefiningQuery and ...

select latest entry per day and corresponding data

I have a table in SQLite: CREATE TABLE test_results(timestamp TEXT, npass INTEGER, nfails INTEGER) I want to return the last pass/fail information for each day. For example if the table contains... 2009-08-31 23:30:19|0|24 2009-08-31 23:37:18|0|24 2009-08-31 23:40:00|0|24 2009-09-01 19:02:13|0|2 2009-09-01 19:08:24|2|0 2009-09-01 1...

.NET SQLite and Click-Once Deployment

Have a smartclient application that is distributed using Click-Once, but also includes a SQLite DB for a local cache. The problems is that once the app is published it doesn't seem to be able to open the SQLite DB file. Have included the DB file as part of the install process... Any thoughts? ...

.NET 32-bit dev vs. 64-bit prod

This question is kind of related to another question but I have a specific scenario in mind. We do our development on 32-bit machines and deploy to a 64-bit server. The application is an ASP.NET Web Application and we use SQLite for the backend of this application. When I try to build on the remote machine I get errors from MSBuild sa...

SQLite iPhone error,

I am following through this tutorial and after completing it I am getting an error on build. The error isn't associated with any line of source code though. This is the error I get: Line Location Tool:0: collect2: ld returned 1 exit status Line Location Tool:0: symbol(s) not found Line Location Tool:0: -[todo initWithPrimaryKey:database...

SQLAlchemy Connections, pooling, and SQLite

so, my design calls for a separate SQLite file for each "project".. I am reading through the SQLAlchemy Pooling docs more carefully.. my guess right now is that I dont want to fool with pooling at all, but this is really a separate connection engine for each project.. Agree?? In that case, when I create the engine, either I connect to a...

How can a materialized view be created in sqlite?

I've done countless searches on materialized views and SQLite. Of what I can find there seems to be mentions in 2004 and 2006 that SQLite DOES NOT have materialized views. Followed immediately by SQLite's changelog from March 2008 where it specifically mentions optimizing materialized views. Now, I figure logically either the 2004 and...