sqlite

IPhone core data simulator

I've created an app that uses core data. Is there a way to view the sqlite db on the simulator? A tool perhaps that allows to query the sqlite db on the simulator? Like a data browser? Is there a way to browse the iphone simulator to the sqlite db location? ...

ActiveRecord - pre fetch single records from association

Consider the following models.. class Product < ActiveRecord::Base has_many :pricings end class Pricing < ActiveRecord::Base belongs_to :server end Pricing is a historical tracking table for prices of products, so there may potentially be hundreds of price points captured over time. What I want to add is a way to get only the...

Need to sort and group tableviews using SQLite on iPhone

I have two different tableviews, one needs to be grouped by region, one needs to be listed alphabetically. I am using an SQLite database. The grouped tableview needs to be grouped by a column in the database called Region. The alphabetic view uses a column of data called hotSpgsName. Someone told me to use a NSDictionary, but I would lik...

UML Modelling: How to set the combination of two colums to be unique?

Hello everybody, I have a question about DB modeling, I have a table created as following: CREATE TABLE "users_articles" ("id" INTEGER PRIMARY KEY NOT NULL,"article_id" INTEGER,"user_id" INTEGER) Which statement will alter this table, so that the combination of article_id and user_id is unique? Which statement tells me, if the DB h...

I need to find closest date in a rails app.

Hi, I need to find the closest date to a given date using a rails named scope. With MySql I could use DATEDIFF but I want to keep database agnosticism, following doesn't work with Sqlite: named_scope :closest_to, lambda { |*args| date = args.first count = args[1] || 1 {:limit => count, :order => "ABS(DATEDIFF(hour, date_field, #...

MongoDB, Complex Queries, and Performance

Back-Story On a current project, I am using MySQL and SQLite in combination with each other. I'm currently giving each user their own SQLite database to get around my provider's 1GB MySQL DB limit. It's worked out alright and the performance is good, but I know for a fact that continual maintenance of these flat-file databases will be a...

Using Eclipse SWT Image, JAVA and SQLite to insert, store and retrieve Images.

Hi all, Any help would be greatly appreciated. I'm writing a basic Java application that allows a user to insert details about individuals into an SQLite database. I'm using Eclipse SWT for the GUI. Eclipse SWT defines a type Image (org.eclipse.swt.graphics.Image) for displaying Images in a GUI. I am trying to allow a user to browse...

importing ofstream to sqlite db

Hi, Right now, in my c++ code, I am writing my ofstream to an output xls file. I also want to direct it to a sqlite database from my c++ code. Is there anyway for doing this? ...

querying a sqlite db with date needs always a time value too like ("yyyy-MM-dd 00:00:00");

Hello, I use C# and sqlite. To get data for a certain datetime value I have to write this: com.Parameters.Add(new SQLiteParameter("@MyDate", day.ToString("yyyy-MM-dd 00:00:00"))); In my database all date entries have a time date + 00:00:00. How can I query my database with ONLY a date format not datetime format? ...

Rails : How to build statistics per day/month/year or How database agnostic SQL functions are missing (ex. : STRFTIME, DATE_FORMAT, DATE_TRUNC)

Hi everyone, I have been searching all over the web and I have no clue. Suppose you have to build a dashboard in the admin area of your Rails app and you want to have the number of subscriptions per day. Suppose that you are using SQLite3 for development, MySQL for production (pretty standard setup) Basically, there are two options ...

Python, sqlite -Any backup methods that include the index as well as the indexes table?

I see by this question - http://stackoverflow.com/questions/4019081/copy-a-sqlite-table-from-a-disk-database-to-a-memory-database-in-python - that sqlite tables can be transferred from one database to another. I was wondering though, do Any of those methods also copy the index,can they be modified to copy the index, and are there any oth...

How can I execute an SQLite statement in C++

I have the following command which works fine on Linux Console. But to get the result to a cpp file I have to store it to file and then read it. But is there a way I can directly execute this command in C++. /usr/bin/sqlite3 /etc/myDB/db/share.db "select path from folder_info where ftp='YES'" ...

How can I create my numbers matching table populate from zero instead of one ?

I'm using a numbers matching table, from one upwards. However, I realize I need to start at zero instead. Can't figure it out.. CREATE TABLE IF NOT EXISTS util_nums (n integer primary key autoincrement not null); insert into util_nums(n) select null from (select 0 as n union select 1 union select 2 union select 3 union select 4 u...

NHibernate sqlite database providers configuration

I'm writting simple application and i'm stuck in the defenition process it seems i'm lacking a reference or a dependency but after reading every blog/forum/starter kits i couldnot find the answer i hope you'll be able to help me I defined an employee class and mapping object with id, name and age created a database using sqlite and cre...

problem on inserting&retrieve image data in sqlite database using android

Hi all i am new to android development.currently i am facing a problem while inserting/retrieving image to sqlite database using android. //code for inserting image InputStream in = OpenHttpConnection(imgurl); byte[] bb = new byte[in.available()]; in.read(bb);//here the length of bb is 2040 //update query myDataBase.execSQL("Update...

How can I write to a SQLite database file in a SourceForge project's web space?

I have a small Perl-based CGI application, which I am running in the project web space provided for a SourceForge project. This application stores data in a SQLite (v. 3) database file. When I run test scripts from a shell, I can read from and write to this SQLite file. However, when the CGI code is executed by Apache, it has read-o...

When using SQLite what do I have to have in end users machines?

This program will run 100% independently from anyone. Just the guy and his computer. The SQLite database is just a little .db file right? I've also downloaded a driver for accessing the SQLite database using Entity Framework. What would I need to deploy on a users machine? Just the folder with the .exe and the .db file? Thanks. ...

Alternative to .iterdump for sqlite in python?

Hi, I found a function that will help me load a disk sqlite database to a memory database, but have found that the module I need, apsw, doesn't support it, while pysqlite does. I need apsw because it has most of the functions I need that pysqlite does not. Is there any work around To completely copying to a database? ...

HTML5 Web SQL DB - Maximum table size?

I'm part way through building a fairly complex HTML5 web app, that retrieves its data from a Web Service to populate the Web SQL databse. All was going well with the test data, then I tried using some real data (a table with around 10 cols and over 180,000 rows) and ran into some issues. I am sending the SQL responses in "chunks" of 50...

sqlite foreign key in iphone sdk

hai guys, i am planning to create a table view and the detail view for the corresponding row, all the datas are fetch from the sqlite database. For this i have created two tables in the database table one for the datas in the table view list and table two for the detail view of the table list. i set the product id as the primary...