sqlite

SQL to handle table updates in a "dynamically typed" fashion

I'm playing around with Python 3's sqlite3 module, and acquainting myself with SQL in the process. I've written a toy program to hash a salted password and store it, the associated username, and the salt into a database. I thought it would be intuitive to create a function of the signature: def store(table, data, database=':memory:') ...

Android SQLite DB Becomes Corrupt

This is an issue that has been plaguing me for a while now. I am trying to use SQLite DBs to store information in my application. Once I open a DB, I close it right after I'm finished. Here is a rough overview of what I do: getWriteableDB; // Perform DB Operations closeDB; This works great, most of the time. Occasionally, the DB files...

Flex 4 How to create an Encrypted SQLite Database

Hello! How can I create and use an encrypted SQLite database for an AIR application, please? Thank you. ...

How do I query a SQL database to return the first "page" containing the specified data?

------------------------ | | A | | ------------------------ | | B | | ------------------------ | | C | | ------------------------ -----Page 1 | | D | | ------------------------ | | E | | ------------------------ | | F | | ------------------------ --...

Is there a comparison table showing differences between MySQL, SQLite, and PostgreSQL SQL implementations?

I believe I my understanding is correct that there is a standard SQL. I'm assuming that MySQL, SQLite, and PostgreSQL all have variable support for the standard. Can anyone point me to a comprehensive comparison table that shows the differences? ...

How to return "row number" of first occurrence, SQL?

(row number not stored in db) ------------------------ | | A | | (1) ------------------------ | | B | | (2) ------------------------ | | C | | (3) ------------------------ -----Page 1 | | D | | (4) ------------------------ | | E | | (5) ------------------------ |...

xcdatamodel with a new attribute

I've updated the xcdatamodel with a new attribute. i've made sure to remake the managed object class file. the add new version/set current version has been done also. I made sure to delete the app from the iPhone and even did the build > Clean all targets thing. the problem is that when I look in the sqlite file the new attribute/field...

What should I use ? core Data or sqlite in iPhone SDKc

I'm making dictionary, it have over 50000 rows. Now, I'm using sqlite for 30000 testing. It is slow for searching. I'm worrying about 50000 records. So, I'm thinking to use core data in iPhone SDK. Should I use coredata , instead of sqlite ? Which one is faster ? ...

new field added to sqlite table problem

I added a new field (type BLOB) to an sqlite table and the table size doubled from 50mb to 100mb. the field doesn't have any data in it yet. anyone know why this would happen? thanks for any help. ...

Delete entries from releted tables

I have got 2 tables: Contacts and Users. Contacts table contains user_id which are referring to id in Users table. Contacts also contain list_type column. Contacts: user_id, list_type Users: id, data How can I delete entries/rows from both tables (Contacts and Users) that are referring to given list_type? The trick is that i don't wa...

How safe is SQLite WAL on power failures?

In the SQLite documentation on the write-ahead-log feature introduced in version 3.7, there are some comments which confused me a bit. The linked page says "syncing the content to the disk is not required, as long as the application is willing to sacrifice durability following a power loss". Then a couple of paragraphs down, it says "C...

I cannot figure out what I'm doing wrong with this basic NHibernate query...

Okay, I have a class, Company public class Company { public virtual int Id { get; set; } public virtual IList<Role> Roles { get; set; } } And another class, Role public class Role { public virtual int Id { get; set; } public virtual Company Company { get; set; } public virtual RoleLevel RoleLevel { get; set; } } ...

New Line character \n not displaying properly in textView Android

I know that if you do something like myTextView.setText("This is on first line \n This is on second line"); Then it will display properly like this: This is on first line This is on second line When I store that string in a database and then set it to the view it displays as such: This is on first line \n This is on second...

Editing cursor data before ListAdapter displays it in the ListView

I first retrieve information from the SQLite database into a cursor. The cursor contains a timestamp column in the format: yyyy-MM-dd HH:mm:ss.SSS, for example, 2010-08-27 21:25:30.575 Once retrieved, I set aSimpleCursorAdapter like so (code simplified): SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout...

Return the count of records in a variable, Sqlite, Android, Java

My ultimate goal is to limit records that are able to be created so that I can have a trial version of my application. I'm thinking I can do this rather simply by returning an int variable within a sqlite count statement, and using a simple IF statement to determine if a new record should be created. I call like so: int jcount = 0; ...

Saving images from an sqlite table

I have an sqlite table w/ 500 records each with images stored as blob data. The images are all large size and I need to make thumbnail sized versions of each image and then save them in a separate field. Does anyone know what would be the optimum way of approaching this task? One other question - is it recommended to have a separate ta...

insert unicode string in sqllite database from qt

Hi, I am creating a sqllite database from qt like this : QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE", mConnectionName); db.setDatabaseName("myDattabse.DB"); if (!db.open()) { return false; } When trying to insert macedonian characters in the sqllite database, the characters are inserted as ???. According to this link htt...

Very large NSDictionary vs Core Data vs SQLite for read-only look up on iPhone?

I'm tinkering around with a iPhone word app where I am using a DAWG structure for finding anagrams from a user defined word bank in real time as the user types. That part works well. As the words are identified, I want to retrieve specific information about each word which I currently have in a plist file (keyed by word). This informa...

Opening multiple temporary sqlite db in S#arp Architecture - Best practices

Hi there, I hope someone can give me some suggestion on how to face this issue. I have a S#arp Architecture application with a primary centralized db and that works fine. I need to extract data from the central bd and save it to a smaller sqlite db and then, eventually import it back. The sqlite connection has to be temporary. Open the ...

iPhone storing large amounts of images

I have a large amount of images that correspond to records in a sqlite db. where should I store them? I have 3 versions of the same image - large, med, thumb sizes. (I don't want to store them in the db table, but reference them instead from each record) all the images have the same name - each small, med and large image files would all...