Community Questions & Answers
Database results from different tables on the same line - manipulating TableViews
I want to display random strings from different tables within the same line/row to form a complete sentence. I can return one result per line but cant work out how to manipulate tableviews/rows to include different pieces of data on the same line. I have...
to update data from phpmyadmin to sqlite
Hi i have to update sqlite tables when i updated the tables in phpmyadmin from titanium studio, means i have tables in phpmyadmin and created same sqlite and installed db frm titanium, now when i update tables in phpmyadmin, sqlite tables shud also...
Alloy not Saving
II'm creating an app using Alloy and can not save any data in SQL. There is no error message displayed, but when I close and open the emulator, compiling a new application (without uninstalling), no data is maintained, implying that the SQLite database is...
[WARN] : Called remove for [object TiUIView]
I am storing the top and left values, then trying to read and pass them to a (new or old) view when needed. I am getting [WARN] : Called remove for [object TiUIView] on [object TiUIWindow], but [object TiUIView] isn't a child or has already been...
SQLite error binding unknown parameter type
I am build an app for iPad, I am getting this error ~~~ Script Error = SQLite error binding unknown parameter type 'TiUIViewProxy'. Value: '[object TiUIView]' at database.js (line 96). ~~~ as I try to save my Ti.UI.createView to a data base so that I...
show data from on emulator from database
hi everybody i want to show extract data from my sqlite database and show it in a list view but my code didn't work ~~~ var win = Ti.UI.createWindow( { layout:'vertical' }); //invoke a web service // create...
Problem with database
Hi guys, I'm creating a database using Ti.Database. I'm trying to have an auto-increment column so that i can update values of the row or delete the row. When i try create the column, i encountered an error. Can anyone help me debug? And I wanted the...
Sqlite throws 'undefined' error on Insert
This is driving me crazy. I dont even know if its a syntax problem or a titanium problem. I'm just trying to create a database with 2 values at columns. ~~~ var db = Ti.Database.open('users'); try { db.execute('CREATE TABLE IF NOT EXISTS...
Uncaught typeerror cannot call method 'open' of null
Hi Everyone, Every time I click on the tableview and trying to open a new tableview I'm getting this error message uncaught typeerror cannot call method 'open' of null Location: [58,27] detail.js Source:...
Titanium Graph with SQLite Values..??
HI developers very Good Noon, I'm facing some issues with Titanium graph plugin.. And How to plot graph with sqlite database values as already saved in my app. Please let me know dev's i'm waiting for ur help now.. Thanks in advance... SuthanM.
Alternatives to a switch statement? Execute code after first block of code has finished.
This is a simplified version of my event listener, the code works fine. But, I have 16 cases. Is there a way that I can do this with out using switch statements, a more efficient way? The count down and alert fire at the beginning of each case. ~~~ var...
alter table causes problem
i renamed a column called id to user_id in table user and I am using ~~~ var conn = Titanium.Database.install('/myDB.sqlite','myDB'); ~~~ when i try to insert a record in this table i get error ~~~ table user has no column named user_id ~~~
SQLITE
now i want to make an application on android and ios , so my question can i make it with sqlite and when any change happens to the database will affect on the other phones thnx
use pre created database
I have a sqlite database which consists of tables and data in it. How to use this in alloy?? i did `Titanium.Database.install('myDB','myDB');` and myDB.sqlite file is in assets folder
advantages and disadvantages of how to create a database
Currently I am creating the database via command db.Execute (), is fine for me, but do not know if it is better to create the file sqlite externally and install from within the application by db.install. 1. What are the advantages and disadvantages of...
UPDATE sqlite table with remote data not functioning correctly
Hi all, I am creating my first project that uses sqlite. I have had trouble creating the database last week and luckily help was found in this forum. After another long week of programming, I find myself stuck again. So I hope I am as lucky as last time....
Database not working on iPhone, while working on iPad?
I have the exact same code: --- var db = Titanium.Database.open('bookmarkDB'); db.execute('CREATE TABLE IF NOT EXISTS bookmarkdata (id INT, title TEXT, thumbImage TEXT)'); var exData = db.execute("SELECT * FROM bookmarkdata"); --- On the iPad...
Get the last inserted record
I want to retrieve the last inserted record...now I am getting the first record ... and db.lastInsertRowId I cant seem to make return the singular record I want ... Any ideas ? ~~~ var SelectStroke = function(){ var db =...
Get variable data
I am trying to collect data from different modules and place the data when appropriate into my DB... you press the button and it sends this data fine to the module ... sort of ... if I comment out //SelectStroke(); it enters all the variable data...
encryption & decryption
I am having username and password in app, and I want to encrypt passwords, what can be done to achieve this?? Thanks, ANiket
appcelerator - sqlite http transaction - apple approval
I'm developing an application in Titanium Appcelerator for IOS that will need to work also offline. For that, I need an sqlite database that needs to be synced with the online one. I chose the quickest way of doing this process, by sending the sqlite file...
support for SQLCipher in Titanium Mobile
Hi All, Is there any support for SQLCipher available in Titanium? If not any plans for near future support as I am unable to see the Titanium Roadmap. I found one Titanium module for SQLite encryption( https://marketplace.appcelerator.com/apps/2398) but...
Question regarding data.push?
Hi Everyone, I have a question regarding pushing data in titanium. With data.push is it possible to push more than one data type from a SQL statement? Thanks
SQLite error codes
I use this code to execute SQL staments ~~~ function execute(_db, _sql, _params) { try { _db.execute(_sql, _params) } catch(e) { alert(JSON.stringify(e)); } } ~~~ but when I execute a wrong SQL command as...
Best Practice question
it is best practice to allow my app to create the Unique User ID " Ti.Platform.createUUID(); " for a table in my database or should the database randomly generate it and return it to the app ?
Create database in the resources folder...
Hi, I have to create few sql lite databases in my application. All db's must be stored in the resources not in default place. Problem is: How to save/open-read database in the resources folder? Do I have to create database by Ti.Database.open and then move...
Get last SQLite error message/code
When I execute a SQL stament that has a sintatx error as: ~~~ db.execute('insert into table(x,y,z) values (?,?,?)',[100,200]); ~~~ How I cant get the last error message or error code? Thanks :)
Titanium iOS- To Display bargraph based on datas from db
In my app, how to display a bargraph based on the datas from the db?, how to fetch datas from db to plot a bargraph?
Sqlite
Where in the SDK can I find the database files I generate... here is the code I'm using to generate... I can't find the DB so I don't know if the db is generated or not generated... I'm getting no errors ... ~~~ var db =...
how to parse multi-line sql statements to database.execute();
Hi all, I am completely new to using local database on titanium project. I have read a lot in the last two days and i am giving up using the install method to install from a sqlite database i exported from SQLite Manager in Firefox. I have a deadline to...
move or copy file sqlite from the internal memory to the SD card
hello experts, please I am trying to develop an android application with tianuim in this application I need to allow the user to move the database file sqlite from internal memory to the external memory (SD card) in extension. sql so that he can import it...
sqLite or XML
We are building a content managed app that downloads a lot of data as XML for the apps pages from a server... Would it lead to a better performance, to read the XML and store it in a database and then query the database for the relevant data, or just read...
error in insert record in SQLite in alloy
Hi Guys, I want to insert a record in SQLite db, but I am getting an error. ~~~ [ERROR] : Script Error = 'null' is not an object (evaluating 'rs.isValidRow') at sql.js (line 253). [ERROR] : Script Error = Module "alloy/models/Test" failed to...
[Alloy] including a file gives error in android but works in iphone
i have used `Ti.include('common_library.js');` in index.js controller and i am using that file's functions it works in iphone but not on android.
Display Graph in Titanium iOS
In my app, i need to display the status of the feedback by a Graph(chart) view. Is webview is needed? I tried RGraph framework, which is showing errors for me, how to use this framework? Are they're anyother ways their to achieve this?Can anyone pls,...
Titanium iOS: Display gragh based on sqlite db datas
In Titanium, i need some guidance in plotting graph based on the sqlite db values. I tried Rgraph to plot graph, but while importing am getting errors in .css and .html files of Rgraph framework. What i need to do to display graph based on the datas from...
Titanium Alloy SQL
Hi, i am using Titanium with Alloy technology.. and i have a form that i want to be save in sql database (into the App) once submitted what is the easier way to do that? is there any examples?
create SQLite database when app is installed
how to have create table statements run only during installing of the app in device??
Removing of database only works on simulator (iPhone)
Hi, I try to update a database: ~~~ var fn = self.DBNAME + '.sql'; var tempfile = Ti.Filesystem.getFile(Ti.Filesystem.getTempDirectory(), fn); tempfile.write(this.responseData); // from xhr var db =...
Mirroring of remote SQLite database
Hi, in my project I generate a sqlite file from mySQL with PHP. I see, if I create a database inside my project then a sql file is living in: `/Users/name/Library/App..port/iPho..ulator/6.1/Applications/MYID/Library/Private Documents` How can I access...
What is the current system for building Alloy Model SQL migrations?
Version One of my app is in the store from about a month ago. I need to add a few columns to my model and I haven't got an upgrade to work yet with this migration. If I install from the app store, then "replace" with this new compiled version,...
Will not allow me to create models and insert into DB
Everytime I try and insert my model into the DB it keeps giving me the same error: ~~~ [ERROR] : nativeReason = "Error Domain=com.plausiblelabs.pldatabase Code=3 \"An error occured parsing the provided SQL statement.\"...
SQLite Transactions using alloy and backbone
Just started using alloy for a project that occasionally needs to insert 1,000s of records into an SQLite table. Previously when I've needed to do this I've used transactions which speeds up the database write time considerably but I can't find any...
Alloy sql fetch not returning the correct value
Hi All, I hope some one can help? Im getting a problem on iOS simulator (works on the android emulator) The EventDate column is storing a UNIX datetime stamp ie '1366143173987' in a sql table datatype int --- exports.definition = { config:...
insert a tableView in another tableView
Hello The title was not very explanatory, but here we go. I have a tableView that feeds a sqlite database, we are clear on that, but in each row of this tableView ... find another table view. The main problem is that the latter does not display my...
Updating an alloy model
How to perform update action in an alloy model. I used Alloy.createModel( ); to insert the values to my sqlite database. Now I want to update the existing fields in my database, Is there any function or method to do that ?...
Insert BLOB to sqlite then read out to new file
I have audio/video/images I need to extract blob data out and insert into database, then delete the original files. This is for a mobile app, I then need to read the blob data back into a new file. Could someone tell me how (or if) I can read the...
How can I insert the annotation's coordinate into database?
I am using SQLite for my application, I want to save the annotation's latitude and longitude into database. However, after inserting, I cant find any change for my database. I am very confuse now. Can anyone help me to solve the problem? Here is my...
Defining a custom sqlite function
Is there a way to define a custom sqlite function in Appcelerator? I am trying to do a distance calculation using latitude and longitude points in a sqlite database but the normal formula I would use relies on SQL Math Functions that sqlite does not have...
Alloy and remoteBackup
I have a pre-build sqlite db in my app using alloy models. I know Apple is going to reject my app if i can't set remoteBackup on it. How do I set the remoteBackup attribute on my DB when I never directly call it?