sqlite

PDO:sqlite doesnt INSERT data, yet no error

. try { $res = $db->exec($sql); if ($res === FALSE) { print_r($db->errorInfo()); die(); } } catch(PDOException $e) { die($e->getCode().':'.$e->getMessage()); } catch(Exception $e) { die($e->getCode().':'.$e->getMessage()); } No error info, and neither does it get caught as an exception. Yet ...

Does SQLite support transactions across multiple databases?

I've done some searching and also read the FAQ on the SQLite site, no luck finding an answer to my question. It could very well be that my database approach is flawed, but at the moment, I would like to store my data in multiple SQLite3 databases, so that means separate files. I am very worried about data corruption due to my applicati...

Is there an extended function library for SQLite?

Is there an extended function library for sqlite? I am trying out sqlite and realized that a lot of the functions I could expect to take for granted in other sql databases don't exist in it, although it appears they can be added to it. Are there some ready made libraries like that for it? ...

SQLite Modify Column

I need to modify a column in a SQLite database but I have to do it programatically due to the database already being in production. From my research I have found that in order to do this I must do the following. Create a new table with new schema Copy data from old table to new table Drop old table Rename new table to old tables name ...

Schema qualified tables with SQLAlchemy, SQLite and Postgresql?

I have a Pylons project and a SQLAlchemy model that implements schema qualified tables: class Hockey(Base): __tablename__ = "hockey" __table_args__ = {'schema':'winter'} hockey_id = sa.Column(sa.types.Integer, sa.Sequence('score_id_seq', optional=True), primary_key=True) baseball_id = sa.Column(sa.types.Integer, sa.Forei...

How would you convert secs to HH:MM:SS format in SQLite?

How would you convert secs to HH:MM:SS format in SQLite? ...

NSMutableArray does not print well with several lines of string

while(sqlite3_step(compiledStatement) == SQLITE_ROW) { NSString *araci2 = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)]; [dbarray addObject:araci2]; NSLog(@"DB ITEMS: %@",dbarray); } First of all, I try to get a description longer than a line from db. While part of the value appears meaning...

How to programmatically fill a database

Hi There, I currently have an iPhone app that reads data from an external XML file at start-up, and then writes this data to the database (it only reads/writes data that the user's app has not seen before, though) My concern is that there is going to be a back catalogue of data of several years, and that the first time the user runs th...

Problem with SQLite related nUnit-tests after upgrade to VS2010 and Re#5

After converting to Visual Studio 2010 with ReSharper5 some of my unit tests started failing. More specifically this applies to all unit tests that use NHibernate with SQLite. The problem seem to be related to SQLite somehow. The unit tests that does not involve NHibernate and SQLite are still running fine. The exception is as follows:...

How to bulk insert a CSV file into SQLite C#

I have seen similar questions (1, 2), but none of them discuss how to insert CSV files into SQLite. About the only thing I could think of doing is to use a CSVDataAdapter and fill the SQLiteDataSet, then use the SQLiteDataSet to update the tables in the database: The only DataAdapter for CSV files I found is not actually available: CSV...

deploying winform application with embedded sqlite

Hello Good people!! I'm deploying a winform application built with vs 2008 0n XP sp3. I created a database with empty schema which i dropped in the root folder of the project and in properties i choosed Build Action: Embedded Resources and Copy to Output directory : Copy always. Now instead of having connectionstring in the app.config...

Limit Records fetched in Android (Sqlite database)

Hi. I am trying to fetch sms messages from inbox, sent items and drafts. I would like to do a pagination for my list view for that it's imperative that I fetch records in pages/chunks. I am not familiar with sqlite which is the database I understand android use to store the data. Can someone tell me how can I restrict the number of rec...

SQLite3 - select date range not working

yet anotherone that gives me grief. In a SQLite3 DB Select I query for a date range specified in (NSDate *)fromDate to (NSDate *)toDate const char *sql = "SELECT * FROM A, B WHERE A.key = B.key AND A.date between ? and ?"; After opening the DB I run the query in Objective-C as follows: NSDateFormatter *tmpDatFmt = [[[NSDateFormatte...

How to add columns to sqlite3 python?

I know this is simple but I can't get it working! I have no probs with insert,update or select commands, Lets say I have a dictionary and I want to populate a table with the column names in the dictionary what is wrong with my one line where I add a column? ##create con = sqlite3.connect('linksauthor.db') c = con.cursor() c.execute('''...

Does Android platform support SpatiaLite?

Is it possible to use SpatiaLite database on Android platform (1.6)? I am trying to program a google buzz-like app which need to take advantage of SpatiaLite functions, like calculating distance between 2 points, etc. Any external library needed? Thanks. ...

SQL DB schema design in context of MVC model development tips/tricks

I'm looking to replace our current model (written entirely in Tcl (please don't even start)) with a new model based around an SQL (sqlite) database, and I'm looking for books/articles giving advice on how one goes about designing a DB schema as well as the model interface around it. I've been reading questions about updating bad DB sche...

How to insert and call by row and column into sqlite3 python

Lets say i have a simple array of x rows and y columns with corresponding values, What is the best method to do 3 things? How to insert, update a value at a specific row column? How to select a value for each row and column, import sqlite3 con = sqlite3.connect('simple.db') c = con.cursor() c.execute('''create table simple (links text...

Application passwords and SQLite security

I have been searching on google for information regarding application passwords and SQLite security for some time, and nothing that I have found has really answered my questions. Here is what I am trying to figure out: 1) My application is going to have an optional password activity that will be called when the application is first ope...

What really happens when I use varchar(10) in the sqlite command-line shell?

I'm messing around with SQLite for the first time by working through some of the SQLite documentation. In particular, I'm using Command Line Shell For SQLite and the SoupToNuts SQLite Tutorial on Sourceforge. According to the SQLite datatype documentation, there are only 5 datatypes in SQLite. However, in the two tutorial documents abov...

Results from two queries at once in sqlite?

I'm currently trying to optimize the sluggish process of retrieving a page of log entries from the SQLite database. I noticed I almost always retrieve next entries along with count of available entries: SELECT time, level, type, text FROM Logs WHERE level IN (%s) ORDER BY time DESC, id DESC LIMIT LOG_...