Community Questions & Answers

SQL Sentences in Models Alloy

Hello, I'm new working with Alloy and SQLite. I want to fill a TableView from a table but I don't need all the table, I just need the rows that have the column Active = 1. For example: ~~~ Database: Rainbow Table: Colors Columns: Id, Name,...

Extract related data from database

~~ i design a Bengali to English dictionary apps.I set two field like text field and a button.I want bengali meaning of English word which i give in text field and after that when i click on button the related word are shown in a table view. I have...

Open Pdf File in android app

Hi all, I want to create an app in which i will store pdf file as blob in sqlite database .And the problem is to retrieve that pdf file within my app is it possible?if yes then please provide me with some link or pseudo code? If no then wht shud u suggest...

Join tables from two different databases

I need to do a left join between two tables which are in two different databases. I read this http://developer.appcelerator.com/question/8001/tip-how-to-attach-another-sqlite-database, but seems not to work ~~~ var dbOne = Ti.Database.open('db1'); var...

How to apply index on models in Alloy

Hi Folks, I searched on internet but couldn't get a way to add and index on Models in Alloy. I having a large set of records (10K+) in one of the table, which is properly structured, but when I access the db using collection.fetch(), it becomes slow. It...

SQLite db and tableview

This is normally not a tough thing to do, but I've tried a dozen iterations of trying to pass values opened up in a SQLite db and put into a tableview and it passing those properties. The only one it passes is the first row's data, all the others don't. ...

weird sqlite escaping issue

All, I am having a weird issue with alloy model generating an unescaped query, even though it uses prepared statement. To recreate it: 1. Create a model with a non integer primary key. 2. Do a simple model.fetch({id: "your_text_id"}); It will...

use of sqlite using model in alloy

Hi guys, I am developing an application for ios as well as android platform. I m using titanium sdk 3.2.0 and using mac os for the purpose. Well the issue is that i m trying to understand the sql-model relationship but yet to understand it. I have...

how to add LIMIT and ORDER BY for sqlite

titanium mobile sdk 1.8.2 iphone sdk 4.3 Error: 'INVALID SQL STATEMENT' Hi, This is how I made the query ~~~ var max = 5; var db = Ti.Database.install('db/fielddb.sqlite','fielddb'); var rows = db.execute('SELECT DISTINCT id, cat, reg FROM fields...

update database only once a data

i am trying to get remote xml data into sqlite database ~~~ var win = Ti.UI.currentWindow; win.backgroundColor = 'white'; var prodName = Ti.UI.currentWindow.prodName; alert('is' + prodName); var data = [];//We'll fill this table after the xml has...

Trpuble with standard sqlite UPDATE

Hi, I fiddle since hours .. In my Android app I'm using sqlite3 and in a first step I insert a dataset.But in next step I try to update with this simple statement: ~~~ db.execute('UDATE myfavsandsaves SET cached=1 WHERE id=?',id); ~~~ id is a md5 string....

Editing model columns

Is it possible to make changes to a model's columns, specifically adding and removing them? If I edit the config in the model file itself, I just get "invalid SQL statement" errors, so it seems the table hasn't actually been altered. Is there a...

Invalis SQL statement

Hi Everybody, Does anyone knows what is wrong on this query? "UPDATE tbList SET checked = " + "'" + status + "'" + " WHERE section = " + "'" + Ti.UI.myObject + "'" + " AND shopItem = "...

SQLite query with åäö

Hi! I'm using this sql query ~~~ "SELECT specie_list.id as id,specie_list.scf as scf,specie_l18n.string as string FROM specie_list INNER JOIN specie_l18n ON specie_l18n.id = specie_list.id AND specie_l18n.lang = '"+currentLanguage+"' WHERE...

Offline Secure Storage

I'm planning on doing a mobile app using titanium for iOS and android. Data security is my main concern since im planning on creating an offline client database to store sensitive data. For what I've seen I can only store this kind of details using sqlite...

Showing 1-50 of 762 1 2 3 4 5 616