Hi,
I have a Python application which throws the standard sqlite3.OperationalError: database is locked error. I have looked around the internet and could not find any solution which worked (please note that there is no multiprocesses/threading going on, and as you can see I have tried raising the timeout parameter). The sqlite file is...
I decided to upgrade my server to Ruby 1.9.1, and a lot of things are indeed much faster. However, I have a process that dumps a database to sqlite, and it's become glacially slow. What used to take 30 seconds now takes upwards of 10 minutes.
The code does several create table statements, and then lots of inserts. The insert statements ...
Hi,
I try to use the SQL statement
SELECT * FROM table ORDER BY column
via an PDO-Object in PHP. Problem is, that I always get an error (Call to a member function fetchall() on a non-object - that means, the query did not return a PDO-object) when using the names of all columnname EXCEPT for ID. When I query
SELECT * FROM table ORDE...
I have a set of .csv files that I want to process. It would be far easier to process it with SQL queries. I wonder if there is some way to load a .csv file and use SQL language to look into it with a scripting language like python or ruby. Loading it with something similar to ActiveRecord would be awesome.
The problem is that I don't w...
can we work with multiple tables of database with same connection object of database at same time .
suppose i have inserted value in table 1 and at same time also inserted value in table 2 of data base with same object of data base connection.
I am using sqlite database in code and getting database locked exception while commit() .
...
currently I am using:
$result = new SQLite3(sprintf("users/USERIDS_DB.sqlite"));
$numRows = $result->exec ("SELECT count(*) FROM USERIDS");
echo sprintf("the number of rows are: %d", $numRows);
but the result is 1 when it should be 6 (the number of rows I created using firefox sqlite3 addon)
Can anybody help please?
...
I have no idea why my code is failing silently. PDO and PDO SQLite are confirmed loaded. Errors are turned on and OTHER errors display.
The SQLite file exists. Perms are set correctly. If I change the filename, PHP actually DOES create the file but still fails silently. No output or commands are excecuted after the "$dbh = new PDO(...
Hi all,
I'm trying to insert some data in a table using sqlite3 on an iphone...
All the error codes I get from the various steps indicate that the operation should have been successful, but in fact, the table remains empty...I think I'm missing something...
here the code:
sqlite3 *database = nil;
NSString *dbPath = [[[ NSBundle mainBu...
Is there a way to create a table in sqlite3 that has a datetime column that defaults to 'now'?
The following statement returns a syntax error:
create table tbl1(id int primary key, dt datetime default datetime('now'));
Update: Here's the correct ddl courtesy of Sky Sanders:
create table tbl1(id int primary key, dt datetime default c...
I have a table defined by the following SQL:
CREATE TABLE test (
id integer PRIMARY KEY NOT NULL UNIQUE,
status text NOT NULL,
enddate date,
/* Checks */
CHECK (status IN ("Current", "Complete"))
);
I'd like to add a constraint that requires enddate to be non-null if the status is "Complete".
Is this possible? I am...
Hey Guys .. I am new to programming in Objective C .
I checked many tutorials on reading data in sqlite3 , but almost all of them have show the data in UITableView .
I have a page where the user types in the password, the password lets say 1234 is saved in the database ( I have created a table already ) .
I have got the database into th...
How can I compare a password.text to text password stored in the database
...
Hi,
I'm playing with Migrations and created a simple migration like
public class Migration001 : Migration
{
public override void Up()
{
TableSchema.Table testTable = CreateTableWithKey("TestTable");
}
public override void Down()
{
}
}
after executing sonic.exe migra...
I am using fabulous LinqPad and its Sqlite driver.
1) Is there a way to obtain Sqlite version information by executing say "select version"?
2) Which driver specific connection string should I use to enable foreign key support in Sqlite?
...
My program uses sqlite3 plus python. It works fine with python 2.6.2
I moved it another machine and installed 2.6.4 and running the program gave me this error
File "", line 1, in
File "/opt/python-2.6.4/lib/python2.6/sqlite3/init.py", line 24, in
from dbapi2 import *
File "/opt/python-2.6.4/lib/python2.6/sqlite3/db...
I am working on Mac OS X,
I want to create a new SQLite DB, and
I am using http://www.sqlite.org/quickstart.html as a reference.
I am entering: sqlite3 test.db
and getting the response:
SQLite version 3.6.12
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
Why is this happening?
...
-(IBAction)EnterButtonPressed:(id)sender
{
const char *sql = "SELECT AccessCode FROM UserAccess";
double result = ([Password.text doubleValue]);
if(sql == result )
{
NSLog(@"Correct");
}
else {
NSLog(@"Wrong");
}
}
...
hi all,
I have problems running a dynamic LIKE statement in my project:
this query works like a charm and returns all items with a 't' in there name:
const char *sql = "select * from bbc_ipad_v1_node where name LIKE '%%t%%'";
When I try to do this dynamically I do not get erros, but just an empty result. It seems that the value is ...
Dear All,
I have a sqlite3 database which saves the images. I am trying to retrieve al the images from the database, but the statement executes once and then it throws exc_bad_access error. If i remove the while keyword and add if instead, the code works fine.Please help.
The code is attached below
if(statement=[self prepare:sl...
-(IBAction)ButtonPressed:(id)sender
{
const char *sql = "SELECT AccessCode FROM UserAccess";
NSString *sqlns;
sqlns = [NSString stringWithUTF8String:sql];
if([Password.text isEqual:sqlns])
{
NSLog(@"Correct");
}
else {
NSLog(@"Wrong");
...