sqlite

SQLite Query - Need Help with Full Text Search

Here's what I'm trying to do. User (a): Enters data in two fields (description-1) and (description-2). User (b) Enters similar data in opposite fields. User (a) or (b) search on both fields would find a match. A good analogy would be a dating search. User (a) enters a description of themselves and the match they are looking for, and...

Why NHibernate simple select in HQL to SQLite database is not working ?

I've recently started using FluenNHibernate and some weird problem appeared when I tried to write unit test with SQLite. I use SQLite in memory database for test, for each test method I am clearing data existing in database. In example: var u = new User() { Name = "Piotr" }; _session.Save(u); _session.Clear(); var list = _session.Creat...

Encrypt SQLite database in C#

What is the best approach to encrypting a SQLite database file in .Net/C#? I'm using sqlite-dotnet2 wrapper. There are tools like SQLite Encryption Extension and SQLite Crypt, but both are non-free, while my project is under GPL. The naive approach I thought of using was to let SQLite handle a temporary file, then to encrypt it on pro...

iPhone localization with sqlite?

How is text in a database localized for the iPhone? The examples I've seen have hard coded strings in the .m file or .xib. For example: NSString firstName = NSLocalizedString(@"First Name", @"This is the first name"); What happens if the strings you need to localize are in the database? I haven't found discussion of this type of lo...

Is there a way to use NSPredicate to issue an NSDeleteRequest vs. an NSFetchRequest in Core Data?

I don't think the class NSDeleteRequest exists, but I want it to. I can make an NSPredicate and use NSFetchRequest to issue: select * from foo where x=y How can I issue: delete from foo where x=y ? The only way to delete 1000's of rows seems to be to fetch them, loop thru them, and call delete on each NSManagedObject. Is that righ...

Syncing a mobile (iPhone) app with web app

Hello, I'm building an iPhone app / web application, and I'm trying to think through the best way to have two-way sync of the databases. I'll probably go with sqlite on the iPhone and mysql on the web (as that's what I know) but am unsure of how to handle keeping them in sync. Here's a sample schema: index_id(autoincrement) | title | ...

What's need to be done in order to prevent foreign language user input to become gibberish?

I'm planning to write an application that, mainly, take inputs from the user and display them. What can I do in order to support input in many languages? Is there an easy way to support all native languages (windows supported)? What's need to be done in order to prevent right-to-left languages to appear backwards? (I saw it happen whe...

T-SQL Conditional Select Across Tables

I have a table (lets call it main_guys) that looks like: id, other_item_id, other_item_type, another_column, group_id The other_item_type tells me which additional table holds additional information identified by the other_item_id. Additional columns required in the query depends on the table identified by other_item_type. So for oth...

how to remove characters from a string in sqlite3 database?

i have a string like this a) Text in my sqlite databse..i want to remove a) from databse..anyone know a query for this? ...

Needs solution to store XML as object or as such in iPhone Apps

Hi, I am a beginner to iPhone App development. Please help me out. In my iPhone application, I am making an API request and getting an XML. I have to parse it, store it in a object(or xml as such) and also display it in my application at a later point of time (Its more like storing the current state). I figured out how to request A...

Escape Single Quote Characters when Importing to SQLite

Hi everyone. I have a records.txt file like this: INSERT INTO 'blogtitles' VALUES('Kelly's at house'); INSERT INTO 'blogtitles' VALUES('Nice catch!'); When i try to import records.txt into the db: sqlite3 my.db < records.txt It gives an error because of the first line. I have many lines like this in the records.txt file. I need a sed ...

SQLite Parameters - Not allowing tablename as parameter

I'm developing an application in AIR via Flex, but I'm not seeing where I'm going wrong with SQLite (I'm used to MySQL). Parameters work, but only in certain instances. Is this part of the built-in sanitation system against sql injection? Thanks for any help! Works: sqlite "INSERT :Fields FROM Category", where the parameter is :Fields...

Is here a framework or wrapper class that makes usage of sqlite3 easier on the iphone?

I wonder if someone already wrote a nice wrapper class that will make it easier to use all this "ugly" c code hacking in objective-c, like casting things around and other stuff? ...

MIDP Java implementation of SQLite DB

Are there any MIDP implementation of SQLite db available for use of sqlite db within a MIDlet, rather than using RMS. Of course, there are Floggy and OpenBaseMovil, however they are based on RMS, but are there any implementations that allows to perform operations in an sqlite db file? ...

Which One Do I Download For Sqlite Phxsoftware

As you know I am very new to this whole programming stuff. I want to use SQLite wrapper by http://sqlite.phxsoftware.com/ But there is a 100% Managed version and The Setup version. So which one do I download exactly? Thanks. ...

Could not load file or assembly 'System.Data.SQLite'

I've installed ELMAH 1.1 .Net 3.5 x64 in my ASP.NET project and now I'm getting this error (whenever I try to see any page): Could not load file or assembly 'System.Data.SQLite, Version=1.0.61.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. An attempt was made to load a program with an inc...

SQLITE - switch data in columns

Hi, I've got a table with the following structure: CREATE TABLE "mytable" ("column01" INTEGER NOT NULL , "column02" INTEGER NOT NULL ) And I want to switch the values between columns - I want column02 to become column01 and column01 to become column02. i.e.: column01 / column02 apple / 01 day / 05 light / 28 And I want it to beco...

SQLite & Linq - how can I visually design the .dbml file?

SQLite first timer, and I want to use Linq for data access. I made a SQLite database with sqliteadmin, and added it as a data source in VS2008. The problem is that when i try to drag&drop a table from the server explorer to the .dbml file, i get the error: "The selected object(s) use an usupported data provider." I used .NET ...

SQLITE - insert question

Hi, I've got a list of items in a certain table and I want to have another table with an ID from the first table and another constant values in other columns. I've got the following query: INSERT INTO table02(item_id, status, card_status) VALUES( (SELECT item_id FROM table01), -1, 10); But it works only for the first row. How can I...

How to keep only one row of a table, removing duplicate rows?

Hello I have a table that has a lot of duplicates in the Name column. I'd like to only keep one row for each. The following lists the duplicates, but I don't know how to delete the duplicates and just keep one: SELECT name FROM members GROUP BY name HAVING COUNT(*) > 1; Thank you. ...