Hi,
I am trying to populate a ListView in a separate class with data taken from a SQLite database held in another class. What would be the easiest way to do so?
Thanks
im trying to find a php framework to build small,multilingual sites.
do you know a php framework with support for:
1.sqlite (it will be little sites so no performance problem and good for copy-paste from development to production)
2.orm
3.i18n & l10n
4.easy search addon
5.ability to just copy-paste no need to change config for going from devel machine to production
and if you know cms with those features put it too
thank you
Is there any easy way to get the number of rows returned by a sqlite statement? I don't want to have to go through the process of doing a COUNT() first. Thanks.
Hi,
I am build a webapp for iphone using Phonegap, and I want to create a DB on the device and not on my server.
I've seen that there is a Safari Sqlite database, but I haven't been able to find any information about using this database with active record.
Does someone knows how to do so?
Best,
Gregory
hi
i use sqlite database on my iphone app and
i need to update this database from the internet from my server
how i can download the new database and delete the old database
and recopy the new database to document directory
Hi,
I read from a sqlite db to my iphone app. Within the texts sometimes there are special characters like 'xf2' or 'xe0' as I can see in the debugger in the char* data type. When I try to transform the chars to an NSString Object by using initWithUTF8String, I get a nil back.
How can I transform such special characters? Thanks for your help.
Bye
Matthias
What SQL can be used to list the tables, and the rows within those tables, in a SQLite database file once i've ATTACHed it on the sqlite3 command line tool?
Is there a way for an Android user to browse the SQLite databases on his/her phone and view the data in the databases?
I use the SoftTrace beta program a lot. It's great but has no way that I can find to download the data it tracks to a PC.
Thanks
hi
i use sqlite database on my iphone app and
i need to update this database from the internet from my server
how i can download the new database and delete the old database
and recopy the new database to document directory
I can't for the life of me figure out this Sqlite syntax.
Our database contains records like:
TX, Austin
OH, Columbus
OH, Columbus
TX, Austin
OH, Cleveland
OH, Dayton
OH, Columbus
TX, Dallas
TX, Houston
TX, Austin
(State-field and a city-field.)
I need output like this:
OH: Columbus, Cleveland, Dayton
TX: Dallas, Houston, Austin
(Each state listed once... and all the cities in that state.)
What would the SELECT statement(s) look like?
I'm wondering if using a CASE statement in SQLite (or other SQL engines) to replace data is not advised. For example lets say I have a query.
SELECT Users,
CASE WHEN Active = 0 THEN 'Inactive'
WHEN Active = 1 THEN 'Active'
WHEN Active = 2 THEN 'Processing'
ELSE 'ERROR' AS Active
FROM UsersTable;
When is it better to create a reference table and perform a JOIN. In this case I would create a Table 'ActiveStatesTable' with ActiveID, ActiveDescription and perform the JOIN.
I can find syntax "charts" on this on the sqlite website, but no examples and my code is crashing. I have other tables with unique constraints on a single column, but I want to add a constraint to the table on two columns. This is what I have that is causing a SQLiteException with the message "syntax error".
CREATE TABLE name (column defs)
UNIQUE (col_name1, col_name2) ON CONFLICT REPLACE
I'm doing this based on the following:
table-constraint
I realise it is possible to create a crosstab within sqlite, but is it possible to dynamically determine the relevant categories/columns at runtime rather than hardcoding them?
Given the following example, it can get rather tedious ...
SELECT
shop_id,
sum(CASE WHEN product = 'Fiesta' THEN units END) as Fiesta,
sum(CASE WHEN product = 'Focus' THEN units END) as Focus,
sum(CASE WHEN product = 'Puma' THEN units END) as Puma,
sum(units) AS total
FROM sales
GROUP BY shop_id
I managed to do this in SQLServer in a stored proceedure before and wondered if there was anything equivalent.
Is there a way to setup SQLite connection pooling using Fluent NHibernate configuration?
E.g. equivalent of DataSource=:memory: would be:
var sessionFactory = Fluently
.Configure()
.Database(SQLiteConfiguration.Standard.InMemory)
(etc.)
Is there something eqivalent to "Pooling=True;Max Pool Size=1;"?
How can I browse the SQLite database that I am creating in my app on my Android myTouch phone?
When I log in through adb shell, sqlite3 gives me a permission denied. Is there another way to check if my database and tables are actually being created, and if rows are being inserted?
I am not able to use the emulator, since it doesn't play videos etc. very well that is the main feature of my app, so I can only test on phone.
Thanks
Chris
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 using SQLite v3.6.16.
Is there anyway to batch two different select queries to either SQLite or SQLCE and get the two result sets back in C#? If not, is there an embedded database that handles this?
Reason: Im wondering how to handle schema migrations. The newer SQLite versions support an "ALTER TABLE" SQL command which would save me having to copy data, drop the table, recreate table and re-insert data.
Hello,
Anyone have idea about how to bind Boolean in sqlite with objective - c.
i know how to bind int and string but i don't know about boolean value.
sqlite3_bind_int(addStmt, 1, id);
sqlite3_bind_text(addStmt,3 ,[message UTF8String], -1, SQLITE_TRANSIENT);
but how can i bind boolean value.
Please help me.
Thanks you
Hello guys,
I want to make a database that will hold a date in it(SQLite).
Now first to ask is what is the right syntax to declare a date column.
The second i want to know is how to insert date in it after that.
And the third thing i want to know is how to select dates between, for example to select all rows which contain date between 01/05/2010 and 05/06/2010.
Thank you
SQLite is a flat-file database and MySQL is a normal database. That's great but I'm not sure which is faster where or better for what? What are the pros and cons of each option?
it's annoying how sqlite always returns a list of touples! i can see the why this is necessary, but when i am querying a single column, how do i get a plain list?
e.g cursor.fetchall() returns [(u'one',), (u'two',), (u'three',)]
from this, how do i get the simple list [u'one', u'two', u'three']?
MySQL has something like this:
INSERT INTO visits (ip, hits)
VALUES ('127.0.0.1', 1)
ON DUPLICATE KEY UPDATE hits = hits + 1;
As far as I'm know this feature doesn't exist in SQLite, what I want to know is if there is any way to archive the same effect without having to execute two queries. Also, if this is not possible, what do you prefer:
SELECT + (INSERT or UPDATE) or
UPDATE (+ INSERT if UPDATE fails)