FAQ Database Discussion Community
android,database,sqlite
I am having issue with android app connectivity to SQLite database. I have an instance of SQLite database in Assets folder. 'Select' operation returns the data that is manually inserted into database.But, Write operations (Insert,Update,Delete) are failing. I was using 'this.getReadableDatabase()' and replaced with 'this.getWritableDatabase', Similarly, SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY) was...
sql,sqlite,android-sqlite
I have table which basically describes a bus route. The table includes all the stops of a particular route. This SQLFiddle shows an example. The data shows the flow in one direction, but a route can also be in the other direction. I need to get a subset of this...
android,sqlite
I want to get some data from Activity B for example ,then put them to DataBase,and save them.After all create listView with this data from Activity A,but I have the error. public class MainActivity extends ActionBarActivity implements View.OnClickListener { Button btnadd; LinearLayout llMain; Time today = new Time(Time.getCurrentTimezone()); DBAdapter myDb;...
android,database,sqlite
I am new to Android Programming.. I am trying to create sqLite Database in android Here is my code sqLitee.java package com.example.sqlite; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteOpenHelper; public class sqLitee extends SQLiteOpenHelper { public static final String DB_NAME="student.db"; public static final String TABLE_NAME="student"; public static final String...
sql,sqlite
I'm fairly new to SQL and I'm having a hard time coming up with a good plan for tables etc to my problem. I'm attempting to create a program that makes use of Sqlite to make it easier for myself to discern postage. I have an item table that has...
android,sqlite
I'm writing an app that manipulates with database consists of 3 tables. I created this database from json file using models (Worker model, specialty model) with getters and setters. Now I want to get specific info from this database. I'v already made it but my code is pretty silly. What...
c#,sqlite
Trying to run a specific query using a where clause, here is what I have. //ID is user input could be anything SqliteParameter Identifier = new SqliteParameter ("@ID", ID); string SQLText = "SELECT Email FROM Client WHERE [email protected];" SqliteCommand Command = new SqliteCommand (SQLText, Database); Command.Parameters.Add (Identifier); string Result =...
android,sqlite,textview
I'm trying to read data from newly deleted SQLite db table row. Basically my program will delete a row when a certain activity is loaded, and I want to check the value inside the row. This is my get code : public String getSlot() { String slots = new String();...
python,django,sqlite
I'm optimising my code which was making far too many queries on start. I'm getting to almost the bare minimum now, and have started coming across the following: QUERY = 'BEGIN' - PARAMS = () This seems to be used almost every single time and practically doubles the number of...
python,database,sqlite,sqlite3
I would like to create a schema for a sqlite3 database in python, but sqlite does not appear to support CREATE SCHEMA (sqlite docs). I've looked into ATTACH, and it seems like it would do the job by using a second database but I only need one database that has...
python,xml,sqlite,parsing,xmltodict
I'm trying to parse an XML file and import it into an SQLITE database. the XML looks like this: <resultset> <row> <column name="pct_lucru">unit name</column> <column name="cod_comercial">00032749</column> <column name="denumire_med">stuff name</column> <column name="producator">fabri</column> <column name="tip_produs">koops</column> <column name="tva">24.000000</column> <column name="umc">1</column> <column name="furnizor">FURNIZORI...
ios,database,xcode,sqlite,swift
I know there are some resources available for this but none of them clearly show the way how to do it properly. I have already populated .sqlite database (MTrader.db) and i want to connect it to my swift project and load the data from the database into spinner. I tried...
c#,sqlite
When I query a SQLite Table from C# using an asterisks like: string SQLText = "SELECT * FROM [TableName]"; SqliteCommand Command = new SqliteCommand (SQLText, Database); (?) Result = (?)Command.ExecuteScalar (); Since there is obviously going to be more than one data value (And Typically of different types) is it...
android,sql,sqlite,select,android-sqlite
I get a strange error: E/SQLiteLog﹕ (1) no such column: Test 06-22 01:51:20.006 15089-15089/com.almas.mehr.sms E/AndroidRuntime﹕ FATAL EXCEPTION: main android.database.sqlite.SQLiteException: no such column: Test (code 1): , while compiling: SELECT * FROM groups WHERE title = Test at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1090) at...
python,sqlite
I'm using sqlite to store some values in a database , but the values are from different source so i have to put them in different database so i tried something like: source_name = "hello" ext = ".db" path = "d:/" fullpath = path + source_name + ext db =...
android,sqlite
I'm trying to make a simple app with a database. The problem is that for some reason the app crashes upon launch. Sadly the crash log doesn't tell me very much except that there seems to be a problem to create the database, but maybe someone here can understand it....
java,android,sqlite,android-sqlite,sqliteopenhelper
I'm new to android development. I'm trying to use a pre-populated database whoch is stored in my assets folder. Log shows that the database gets opened but 'NO SUCH TABLE ERROR' is shown.I can't find any solution to this error. Please help. MyDatabase.java : package com.example.android.atlas; import android.content.Context; import android.database.Cursor;...
java,android,sqlite
I'm having trouble with a spinner on my application. The spinner is supposed to pass the selected Item to an SQlite DB and save data. But so far everytime I press my register button it throws the javaNullPointerException error. This is my class: public class RegisterMember extends Activity implements OnItemSelectedListener{...
sqlite,types
I was trying to make a basket of products and i need to create a type in sqlite like: create type B_productes as object ( id_product integer, quantity integer ); Or if you can give other solution.Thanks...
sqlite,swift,fmdb
FMDB seems to have lots of functions to deal with columns but none for rows. All I am trying to do is find the number of rows in a table. func getTableRows() { sharedInstance.database!.open() let sqlStatement = "SELECT COUNT(*) FROM NAMESTABLE" var resultSet: FMResultSet! = sharedInstance.database!.executeQuery(sqlStatement, withArgumentsInArray: nil) if (resultSet...
php,android,mysql,sqlite
So, the question is almost entirely in the title: I'm running an Android Virtual Machine on a Windows machine and I'm trying to transfer a MySQL database from a XAMPP-phpmyadmin server via a php script and mysqldump to create a new SQLite database on the Android machine. When I run...
c#,sqlite
I have a SQLite database table defined with 3 primary keys: Foo, Bar, and Charlie. I also have a list of partial keys -- pairs of Foo, Bar. I would like to delete all rows in the database table that match the partial key. I understand and intend that the...
java,android,sqlite
I have an android activity with a list of dates. Date are date_from and date_to. so User might enter many dates (date_from and date_to) for some events that occurred in past. I want to store these dates in sqlite database so I made a table of user and entered all...
python,regex,sqlite,datetime
I have a function that I call which generates a timestamp on a event that comes through a For loop. Function, and RAW timestamp def atimer (): timenow = time.time() return(timenow) print timenow 1434615010.27858 The timestamp looks like this "1434615010.27858", which is nice and small for database use in sqlite3....
java,android,sqlite
I have the following method for updating only the COL_COUNT(originally set to 1) of an existing record "tag" in database: public void addCount(){ mFtag = "tag"; String t = "2"; ContentValues values = new ContentValues(); values.put(FTagsContentProvider.COL_COUNT, t ); getContentResolver().update(FTagsContentProvider.CONTENT_URI, values, "COL_TEXT=?", new String[]{mFtag}); } When I run it I got...
java,database,sqlite
i'm trying to make a DAO class for my Java project. I've a SQLite Database with only one table "USER". The schema is: CREATE TABLE USER( username VARCHAR(20) NOT NULL PRIMARY KEY, password VARCHAR NOT NULL, total_matches INTEGER DEFAULT 0, victories INTEGER DEFAULT 0, times_alien INTEGER DEFAULT 0, times_human INTEGER...
java,android,sqlite
I'm a very unexperienced programmer, so please forgive me, but i have searched the web far and wide, and come up with nothing. I have a java program in which i use a SQLite database. I simply need to get the value stored in a specific column and row and...
java,android,mysql,sqlite
So, I managed to create a database handler using tutorials found throughout the internet. Here's a snippet for the insertion operation public ChosenParkingSlot createSlot(String slot) { ContentValues values = new ContentValues(); values.put(ChosenSlotDatabaseHandler.CHOSEN_SLOT_NAME, slot); long insertId = database.insert(ChosenSlotDatabaseHandler.TABLE_CHOSEN_PARKING_SLOT, null, values); Cursor cursor = database.query(ChosenSlotDatabaseHandler.TABLE_CHOSEN_PARKING_SLOT, allColumns, ChosenSlotDatabaseHandler.CHOSEN_ID + " = " +...
sql,sqlite
Two tables: books and authors. A book can have many authors, as in the case of a short story anthology. books id | title -------------------- 1 The Time Machine Did It 2 Snakes in Suits 3 Ghost in the Wires authors id | name ------------------------ 1 Stephen King 2 John...
android,sqlite
There is android sqlite database with one table, im using this query for getting values : Cursor cursor = db.query(Table_Items, null, "type=? AND operationtype=? AND problemtype=?", new String[] { roosazi,type,problem }, null, null,KEY_Items_ID+" "+date , null); everything is working fine. question is: how can i get all from specific column?...
android,database,sqlite,sqlcipher-android
My Android application uses SQLCipher for a database encryption, as per my project requirement I need to store Bitmap String in my local database which needs to get removed from the database once uploaded to the server successfully. But here I met with a very weird issue with the SQLCipher...
ruby-on-rails,ruby,sqlite
I have a query and I only want to output three variables Relationship.select('follower_id as source, followed_id as target, value').map(&:attributes) however the result I am getting includes the id variable as below which I dont want. How do I get rid of it? {"source"=>1, "target"=>3, "value"=>1, "id"=>nil}, {"source"=>1, "target"=>4, "value"=>1, "id"=>nil},...
python,sqlite,sqlite3
I'm learning to use sqlite in python by sqlite3. The SQL operations like insert, update support support transaction and the commit() should be called before close the connection, or nothing would change in the database. However, the 'create table' do not support transaction, or the create table is auto committed....
angularjs,sqlite,google-maps
I'm doing an angularjs app using google maps api v3 and a plugin called ng-map. But I want to store some coordinates in a SQLite database and then retrieve from the app.
ruby-on-rails,sqlite,heroku
I was using sqlite gem for my rails project, and since I had to put the app on Heroku, and Heroku doesn't support sqlite, I added pg gem to my Gemfile. gem 'pg', '0.17.1' But now I am not able to run the project locally on my machine. Specified 'sqlite3'...
java,android,sqlite
In my Android application I am using compiled statements to be able to insert rows quickly: insert = db.compileStatement( "INSERT INTO foo (id, aaa, bbb, ccc) " + "VALUES (?,?,?,?)"); This works correctly and quite fast. However when there is already foo with id, I am receiving following exception: column...
java,android,mysql,database,sqlite
I have an book mark option in my application, here to sort in SQLITE by "order by" using selected set of column values (ID) like: order by (ID=1,5,4,3) so I would get record 1, 5, 4, 3 in that order out, But it show id=1,2,3,4,5 in listview please any one...
sql,sql-server,sql-server-2008,sqlite
how to write a script to add 3 new columns to a stockout table in all databases in sql server
android,sqlite
As I see in Android sources here is available method to register my own custom functions. But when I trying to call addCustomFunction() I get an error "cannot resolve method". Also I cannot find it in official documentaion. Why this method is not available?
android,database,sqlite,android-sqlite
if i have same values in a column and i want to return only one instead of all of them what would be a method. ArrayList<String> getAllNotes() { Cursor cursor; mDbHelper = mSqliteHelper.getWritableDatabase(); String query = "SELECT * FROM " + SqliteHelpers.TABLE_NAME; cursor = mDbHelper.rawQuery(query, null); ArrayList<String> arrayList = new...
python,sqlite
The end goal is to modify Firefox cookies.sqlite db before starting Firefox. At present, I want to display what tables are in the db. I copied the cookies.sqlite db to my desktop. I'm working with the db on my desktop. This is my first time using sqlite. I copied some...
javascript,angularjs,sqlite
Hello I want to use persistencejs in my angularjs/ionic mobile application. I use a sqlite database on the device. I used this example to use persistencejs in my application but I get an error: undefined is not an object (evaluating 'persistence.store.cordovasql.config') In my index.html I bind the js files like...
.net,sqlite,system.data.sqlite
I'm struggling to find documentation around System.Data.SQLite's behaviour in regards to the various .NET data types. For example, how does System.Data.SQLite store .NET Booleans in an SQLite database? There are several possible methods: Integers 0 and 1 Integers 0 and –1 Text 'True' and 'False' Text 'T' and 'F' Text...
sql,sqlite,sqlite3
I have two SQL tables (I am using SQLite). Table1 (code TEXT) Table2 (code TEXT, codeTable1 TEXT) How can I fetch all the table1's content which has at least one row in the table 2 with the codeTable1 not null?...
android,sqlite
I have two Activities, A and B. Data comes From activity B to A through OnActivityResult method, and I want to display them to ListView. But when I click the button from B Activity, nothing happens. public class MainActivity extends ActionBarActivity implements View.OnClickListener { Button btnadd; LinearLayout llMain; Time today...
java,sqlite,date,jdbc
I am trying to insert to my table, a date in format "yyyy-mm-dd". My table has a field date type DATETIME and I use SQLite DB SYSTEM. I need to be in this format, so later to have the option to select dates from - then. My table: CREATE TABLE...
java,sqlite,jpa
Hello i have a Problem with Sqlite and JPA. I have the following table in Sqlite: Section: secID INTEGER Primary Key secname TEXT If I use Primary Key in Sqlite this Value will automatically updated when i insert a value like INSERT INTO Section(secname) VALUES("Default"); In my Java Classes i...
mysql,sqlite,jdbc
I have 2 tables TABLE1 and TABLE2 in sqlite DB. TABLE 2 has some of the records of the TABLE1. What I want is to select all the records from TABLE 1, which don't exist in TABLE2. So I coded: String sq = "SELECT TABLE1.name, TABLE1.surname, TABLE1.id FROM TABLE1" +...
sqlite,android-sqlite
Currently, the following sqlite query returns 45 records. I know that only 4 albums exist. How can the query be made to return only those records that are unique to albumTable.album. Pseudo Code: where albumTable.album is UNIQUE query = new StringBuilder(); query.append("select albumTable.album, artistTable.artist, songTable.filepath "); query.append("from albumTable "); query.append("inner...
sql,sqlite,inner-join
I have got a translation table for my text like: Table: todos day | text_id ------------- 0 | 1 1 | 2 1 | 1 Table: translations lang | text_id | text --------------------- deu | 1 | Laufen eng | 1 | Running eng | 2 | Swimming Now I...
android,sqlite
I have the button that change field of DB value.And I want to display in ListView all fields with have some value(top,on my example).I know,Im doing something wrong,but dont know what. MainActivity: public class MainActivity extends ActionBarActivity implements View.OnClickListener { Button btnadd; LinearLayout llMain; Time today = new Time(Time.getCurrentTimezone()); DBAdapter...
android,performance,sqlite,compare
We are developing an Android App based on a product that already has a website. As a result, when launching the Android app it may happen that a lot of things differ between the local SQLite database and our central database. What is the fastest way to synchronize the Android...
android,sqlite,local-storage
I'm pretty new to the Android developer. I'm currently making an simple message app. so i want to store all the text message I received from node server. I don't really now how should i do this. the msg I received from node server is JSONObject like: {"name":"XX", "id":"XX","message":"xxxxxxxx"} and...
java,android,multithreading,sqlite,android-asynctask
Hello I will define my problem more clearly here. I am working on my first Android App that reads simply an NFC Tag and compares it to an SQLite database stored on the device. In short, if this is successful (Tag is ok, code exists in the database) the screen...
java,android,sqlite,datetime
I'm using the Google Tasks API in my app. One of the fields in my app "due date" requires a DateTime object. Im using the Android datepicker dailog and an EditText view to capture the due date and then converting the user input into the datetime format. When I try...
android,sqlite
I want opy some static info from database from assets (dont need copy on device). How I can do it? This code open database from inner folder: public SQLiteHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); this.context = context; } ...
ios,iphone,sqlite,core-data
I want to update the database of my existing app(for new version) which is live on the app store. So I need to delete my existing database before using app or I can change the name of the database. After it If data exists in my old database I have...
mysql,sqlite,left-join,union-all,right-join
I've got two queries, one uses a union all function. select * from ( Select ticket_id as Ticket_Num , name as Name , approved_at as Approval_Date , price as Price , quantity as Quantity , (price * quantity) as Cumulative_Price From purchase_list_items union all select '' , '' , datetime('now')...
sqlite,foreign-key-relationship,database-migration,alembic
The Alembic migration for a SQLite database: def upgrade(): with op.batch_alter_table('my_table') as batch_op: batch_op.add_column(sa.Column('parent_id', sa.String(24))) batch_op.create_foreign_key('parent_constraint', 'my_table', ['parent_id'], ['id']) which is supposed to create a foreign key parent_id referencing id of the same table my_table, creates a reference to a table called _alembic_batch_temp: CREATE TABLE "my_table" ( id VARCHAR(24) NOT...
android,sqlite,listview,arraylist,android-arrayadapter
I want to create a quiz app which contains 1 question and 4options for that I created a database from which the questions and options are fetched to 5 textviews using ListView. I surfed many tutorials and using a page from stackoverflow created it using ArrayList and Cursor but i...
sql,sqlite
I'm a beginner to SQL so this is quite possibly a very simple question. I have a table with postage service information like so: ID Service Max_Weight Cost ---------------------------------------- 1 SecondClassStandard 0.10 0.95 2 SecondClassStandard 0.25 1.19 3 SecondClassStandard 0.50 1.51 4 SecondClassStandard 0.75 2.05 5 SecondClassStandard 1.00 2.80 How...
database,sqlite
I've already designed a website which uses an SQLite database. Instead of using one large table, I've designed it so that when a user signs up, a individual table is created for them. Each user will possibly use several hundreds of records. I done this because I thought it would...
c#,linq,entity-framework,sqlite
I have used MS SQL server a few times and have yet to run into a speed issue when querying, using linq to entities. This time, I am using sqlite, as to ship the entire database with the application. I have a winforms app that contains 4 search fields. My...
android,database,sqlite
I have a problem with SQLiteAssetHelper (https://github.com/jgilfelt/android-sqlite-asset-helper): I cant open the tables in my database correctly. The database is made using sqlitebrowser. I have a database with two tables filled with strings which I want to access with a Cursor, but when I try to access them both, it gives...
java,android,sqlite
I having trouble coping a database from the assets folder to the databases folder. When the user start the application I check if the database doesnt exists and if true I copy the database. Where is my code: private void CopyDatabaseIfNotExists() { dbName = "quizdb.db"; File f = getDatabasePath(dbName); if...
android,database,sqlite
I have versions 4,5 out in production for my application. Between 4 and 5 I added new columns to my app's database adapter using the alter statement: public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { //add new columns String alter = "ALTER TABLE " + DATABASE_TABLE + " ADD...
android,sqlite
When I try to retrieve multiple rows from SQLite by using the WHERE clause, I am getting only the first row... i.e.: mCursor.getCount() returns 1 always... Is there any way to retrieve multiple rows from a table by using the WHERE clause? This is what i have tried so far...
ios,sqlite
I am using INNERJOIN query on two tables naming EMPLOYEE & DEPARTMENT. There exists a common empID(1234) which is common in both the tables and I want to fetch the data from both tables using join query. BUt its not working. Here is my code below: NSString *querySQL = [NSString...
sql-server,sqlite
This question already has an answer here: TSQL Generate 5 character length string, all digits [0-9] that doesn't already exist in database 6 answers i want to create a coupon code generator by using SQL database but i don't know how to generate 1000 of random number without repeating...
java,android,sqlite
Question Following tutorial, trying to put some simple string into a database every time I press a button. I believe that the "usernames" are being entered into the database, while debugging it doesn't do anything funny. My problem is when I want to call databaseToString(), I set a Cursor to...
sql,sqlite
I have a table t as follows: CREATE TABLE t( id INTEGER PRIMARY KEY AUTOINCREMENT, date TEXT, a TEXT, b TEXT ); Sample Data 1|2015-06-15|a1 15|b1 15 2|2015-06-15|a2 15|b2 15 3|2015-06-16|a1 16|b1 16 4|2015-06-16|a2 16|b2 16 5|2015-06-17|a1 17|b1 17 6|2015-06-17|a2 17|b2 17 I want to select all values of a...
c#,sql-server,sqlite,if-statement,sqlite3
I have a sql server query as follows in a store procedure with parameters @firstId and @secondId IF @firstId = '' begin SELECT DISTINCT x, y = FROM t1 LEFT OUTER JOIN t2 ON t1.id = t2.id AND t2.id = @secondId ORDER BY t1.somecolumn END ELSE BEGIN SELECT DISTINCT x,...
java,database,sqlite,jar
I want to create a java application which will use Sq Lite database and after making jar file my application will read and write Sq lite database file. So how to achieve this.... please give me overview how to access Sq lite database file and modify it. after making jar...
java,android,json,sqlite,nullpointerexception
I am new in android development..I want to insert json string in Sqlite database and getting error : java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1212, result=0, data=null} to activity : java.lang.NullPointerException. here is my code : DbAdapter.java static final String DATABASE_FEEDBACK="CREATE TABLE IF NOT EXISTS "+" feedbackjson "+ "("+"FeedbackId"+" integer primary...
python,sqlite,concurrency
I'm trying to share a sqlite3 database between one writer process, and one reader process. However, it does not work, and it seems to me that nothing is being written in example.db. reader.py import sqlite3 from time import sleep conn = sqlite3.connect('example.db', isolation_level=None) c = conn.cursor() while True: c.execute("SELECT *...
javascript,html,sqlite,cordova
The function get_list() here is able to execute the query but not able to display the rows. function get_list() { db = window.openDatabase("timeDB", "1.0", "time", 200000); db.transaction(populateDB, transaction_error, populateDB_success); function populateDB(tx) { tx.executeSql("SELECT (date) FROM time", [], function (tx, res) { var len = result.rows.length; if (len > 0) {...
java,android,database,sqlite,listview
I keep getting a Null Pointer Exception when i'm trying to get data from my SQLite database and I'm not sure how to fix this. The code: The activity: public class Draft_Budget extends Activity { String[] budget; DBHelper budDb; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.draft_budget); ActionBar actionBar =...
c#,.net,sqlite,join,windows-phone-8
I have two tables... ITEM and STOREITEM ITEM columns --ITMID_PK,ITMNAME, description ,iCON STOREITEM columns --ITMID_FK,PRICE to retrieve data of ITEM table to list and store in listbox. I follow this List<ITEM> retrievedlist = sqlconn.query<ITEM>("select * from ITEM").ToList<ITEM>(); foreach (var t in retrievedlist ) { listbox.Items.Add(t); } this works perfectly for...
android,database,sqlite
I've a problem! I've a quiz app with few questions what generated from the code, but I make an Activity, where I can put some questions to the other in an SQLite Db from the running program. I write an insert code, but when I load the SaveDataActivity, fill the...
sqlite,insert,insert-into
I have a problem with INSERT Query. I want to insert some fixed values as a name but as well some calculated values. A simple example: INSERT INTO Players VALUES('Name', 10.0, SELECT COUNT(*) AS Amount FROM Stack7 WHERE Name LIKE '%Name%', 1.0) Table Players: CREATE TABLE `Players` ( `Name` TEXT,...
java,sqlite,datetime,jdbc
I insert the current date in a table. I have a method to get the current datet: private static java.sql.Date getCurrentDate() { java.util.Date today = new java.util.Date(); return new java.sql.Date(today.getTime()); } Or in some cases I get the date from a from in a String format e.g. 2016-10-12 and then...
java,android,sqlite
I am trying to create and insert rows in an SQLite table. However, I get an error when inserting the rows that the table does not exist. Can anyone tell me what I am doing wrong here? Thanks! The code in the activity that is calling the class to create...
ruby-on-rails,sqlite,model-view-controller
You can see here that it seems like the raw contents of my DB are being printed to the page. I can't see anywhere in my code why there would be the raw output of the db printed to the view. Here is the code for the index view: <div...
python,sqlite,python-2.7,sqlite3,boolean
Was wondering if there is a way to change a boolean from true / false to in / out? My code below is a boolean switch but I want it to print in or out not 0 or 1 while True: Tag = raw_input("Please Scan your Tag: ") q =...
sql,sqlite,date,timestamp
What I am trying to do is to select a specific month and a specific day from a timestamp. What I have tried is this: SELECT t FROM test WHERE t BETWEEN '2015-08-01 00:00:00' AND '2015-08-01 23:59:59'; with 8 being the specifc month and 1 being the specific day but...
database,qt,sqlite
I am new to qt. I have created a table in sql, and what I'm trying to do is to give an id whenever user adds data. For the first thing inserted it will be 1, second 2 and so on. So how to check what number was the last...
database,sqlite,database-design,rdbms
I am writing a program to help authors maintain lists of references for their research. It must be possible to reconstruct citations in various styles from the database. In the database, I maintain a many-to-many relation between authors and the rest of the reference (title, year of publication, etc.) using...
android,database,sqlite
I'm a complete newbie in android development with some basic programming knowledge. Right now, I want to develop an E-Commerce app which allows the user to upload pictures for the public to browse through. However, I have no idea how should I store all the data, including the details(username and...
sql,sqlite
I'm not very good at SQL, and I have a very peculiar request to do. My table looks something like this : FOO BAR ----+---- foo1 bar1 foo2 bar3 foo1 bar1 foo1 bar1 foo2 bar3 foo4 bar3 foo3 bar2 foo2 bar4 foo5 bar4 I manage easily to count the number...
android,sqlite,android-studio,android-sqlite
I keep getting error that a column in my table cannot be found. Cannot figure out why this is happening. The column names appear to be spelled correctly. I'm getting this error : 06-11 21:27:02.701 3703-3703/com.example.luca.contatti E/SQLiteLog﹕ (1) table Contatti has no column named imageUri This is my DatabaseHandler page:...
android,database,sqlite,android-sqlite
image i want to get the whole row i am using this code to get my desired data but its giving me null pointer exception at temp_address1 here is the code as in mentioned image i want to get the whole row matching phone number. how can i achive that...
android,sqlite
I have a visit reminder activity where I am getting info like name, date, time and reminds before time. After button click I am saving this info in local sqlite database. In the save button click, I am getting every info and then set alarm for generating notification. I also...
android,sqlite,android-intent,homescreen
I want to fetch my all the column from table tblReg, It has column Registration,Name,Password,Email and Contact out which Email is checked while registration ,it is unique column.. value exist only once in table of one Email. I am having login by matching Email with password and passing value of...
angularjs,sqlite,cordova,debugging
In my AngularJS/Ionic app I use the cordova-sqlite plugin and a local database to store data; I also use a web service to fill the database with data from a remote database. Well, sometimes I get a strange behaviour when I try to get data from the remote database. My...
java,android,sqlite
I am Creating SqLite Application ... the application is launched perfectly but when I fill all EditText Fields And Click On The Add Button.. The Application has stopped.. this message popups.. MainActivity.java package com.example.database; import android.support.v7.app.ActionBarActivity; import android.text.Editable; import android.app.Activity; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteOpenHelper; import...
sqlite,schema
I had to rename an existing table in my sqlite database using the following command: ALTER TABLE users RENAME TO widgets; After running that command, when I check the schemas using the .schema command, this is what I see: CREATE TABLE "widgets"(id integer primary key AUTOINCREMENT, widget_tag varchar(10), destination varchar(100),...
java,android,arrays,performance,sqlite
Good Day, I've been working on an update in an android project, and came across an issue. I have to read questions from an SQLite database which i've done successfully by loading it into a multi-dimensional array as shown below in my database helper class: public String getSome(int s,int t,...
database,sqlite
I am using SQlite and the PK column seems to be auto-incrementing. I am a bit concerned about following approach where I want to normalize the type-column: Table: Book id type name ... ... ... 15 1 Foo 16 2 Bar ... ... ... Table: Type id typename 1 magazine...
sql,ruby-on-rails,sqlite,sqlite3
I have an SQL Query that looks like: SELECT "medical_interventions"."id" AS t0_r0, "medical_interventions"."refcode" AS t0_r1, "medical_interventions"."intervention_tid" AS t0_r2, "medical_interventions"."medical_intervention_category_id" AS t0_r3, "medical_interventions"."created_at" AS t0_r4, "medical_interventions"."updated_at" AS t0_r5, "translations"."id" AS t1_r0, "translations"."lang" AS t1_r1, "translations"."text" AS t1_r2, "translations"."created_at" AS t1_r3, "translations"."updated_at" AS t1_r4 FROM "medical_interventions"...
sqlite,swift
This code is triggering an error saying that rightAnswer is nil. It should be very simple; it worked fine until adding in the namesSoFar variable and the and name not in part of the query. I also experimented with changing not in to in, presumably limiting my query to those...