Click here to Skip to main content
15,891,657 members
Everything / Sqlite

Sqlite

SQLite

Great Reads

by Thomas Weller
Demonstrates how to run Python scripts from C#
by DaveMathews
Use Oscova, a bot development framework, to create a Natural Language Interface to an SQL Database
by Glenn Prince
In this second part of the Data Cleaning with Python and Pandas series, now that we have a Jupyter Notebook set up and some basic libraries initialized, we need to load some data. To do this, we’ll load data from a CSV file, as well as from a local SQLite database.
by Hein Pauwelyn
This is an application made for Windows (Universal) 10 devices made with MVVM, IoC-containers and dependency injection. There is also an API from Yahoo and SQLite service.

Latest Articles

by Zijian
Reusable codes for JWT security in business applications
by Mircea Neacsu
Examines the performance of SQLite in multi-threading applications
by Member 4206974
A PHP class that uses PDO for creating a table from JSON Objects
by JBartlau
This article demonstrates how Report Server offers a distribution of reports that save time, increase efficiency, and reduce potential errors.

All Articles

Sort by Title

Sqlite 

19 Jan 2015 by jeetendra keshri1
Hi,When hosting my WCF DataService on IIS on window 8, 64 bit machine i am getting error "Could not load file or assembly 'System.Data.SQLite.DLL' or one of its dependencies. The specified module could not be found." Below are the Configuration code. This DataService is running and...
22 Jan 2021 by A Wyatt
Imports System.Drawing Imports System.Collections Imports System.ComponentModel Imports System.Windows.Forms Imports System.Data Imports System.Data.SQLite Imports System.Diagnostics Imports System.Drawing.Printing Public Class frmAddNew ...
19 Jan 2021 by Sandeep Mewara
Read about ADO.NET and it will help you. Look at these for C# or VB.NET: MSDN: ADO.NET[^] MSDN: Accessing Data with ADO.NET[^] Our own CodeProject articles (specific to C#): Using ADO.NET for beginners[^] Simple ADO.NET Database Read, Insert,...
19 Jan 2021 by RickZeeland
In addition to the suggestions by Sandeep, an alternative may be using this ORM (Object Relational Modeler): SQLite-net[^] And an even easier alternative might be to use LiteDB: best-databases-for-a-small-net-application~litedb[^]
19 Jan 2021 by Maciej Los
Take a look at these articles: Working with SQLite in C# & VB[^] Using SQLite: An Example of CRUD Operations in C#.NET[^]
22 Jan 2021 by A Wyatt
THANKS looks like I have a lot more reading to do
6 Mar 2015 by S.Rajendran from Coimbatore
I have two java class files namely a. listmasteritems b. Mydbhandler. In an activity I use an edittext and a button. On button click in the device, I intend to send the text to the database. I get an error on button click (in device) stating 'Unfortunately,tommy has stopped working' when I...
7 Mar 2015 by Afzaal Ahmad Zeeshan
There are many possible reasons why this caused an error. Connection not established Error in value.. and so on. The actual problem is in your Console; or for Android development in Logcat. You should see for why the exception got raised. Then, solve that exception's cause.
12 May 2022 by rudraSahu7786
I made a Java Project which fetches data from SQLite.db which I included in my project folder. After creating Jar file I converted it to exe file using an app. Now when i am running my exe file. It is not able to fetch data from database. Please...
19 Jul 2020 by rameshk553
Is there any SQLite DDEX provider package available for Visual studio 2019? I've tried to add ADO.NET Entity Data Model item to my WPF project, it was not listing SQLite data provider in the "Choose Data Source" dialog box to create a data...
18 Jul 2020 by Richard MacCutchan
System.Data.SQLite: Home[^]
19 Jul 2020 by Sandeep Mewara
Hi, It looks like you have used Nuget packages. They are for your application and not to provide a provider. As far I am aware (did a quick Google too), believe there is no official DDEX provider package for VS 2019. Seems you can try the...
3 Nov 2014 by muniprasad
I came across Sq-lite database.I found our date time is stored in 18 digit time-stamp.Please help me how to convert it to Local Time. (I tried to convert it(No.of milliseconds from 1900). But i did not get it.It shows 29 days difference. I added 29 days of milliseconds to time. But time...
3 Nov 2014 by ArunRajendra
I don't its possible check this reference in msdn. http://msdn.microsoft.com/en-us/library/ms182776%28v=sql.90%29.aspx[^]
22 Nov 2021 by Michael Sydney Balloni
Wanna add basic database functionality to your C++ app? Too lazy to use SQLite directly? Read on!
10 May 2017 by Member 12753057
Windows CE, .NET compact framework 3.5 Using SQlite Dll File : sqlite-netFx35-binary-PocketPC-ARM-2008-1.0.105.0.zip "http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki" I want to use wal mode. so, I written the below code. string sql = "PRAGMA journal_mode = WAL;"; ...
10 May 2017 by Maciej Los
As SQLite documentation[^] states, a database in WAL journaling mode can only be accessed by SQLite version 3.7.0 (2010-07-21) or later. Conclusion: you have to use newer version of SQLite[^] database. [EDIT] To be able to open SQLite database in WAL mode, you have to open it using special...
25 Feb 2021 by Member 15073686
I was trying to execute this sqlite database in C# visual studio windows application but whenever I try to enter value in text boxes this error occur if anyone have idea please help I am using sqlite studio. What I have tried: using System;...
25 Feb 2021 by OriginalGriff
The basic error is that your list ends with a comma: insert into Login (UserName, PassWord,) But you main problems are a lot more serious. 1) Despite passing parameters to SQL, your command doesn't use them! Never concatenate strings to build a...
17 Feb 2014 by Zakaria Jagral
string dbpath = @"D:\Demo.db"; SQLiteConnection connection = new SQLiteConnection("Data Source =" + dbpath); connection.Open(); String query = "Insert into Customer(Job No,Customer Name,Address,Mobile No 1,Mobile No 2,Mobile No 3,Email_ID) values ("...
17 Feb 2014 by Krunal Rohit
You have not given plenty of info.I'm assuming that there might be an issue with the connection string, So I'd suggest you to take a look at some example of Sqlite connection string at here[^].-KR
16 Apr 2011 by DannyStaten
I am using Entity framework for my project with sqlite as the database. I need to let the user choose their file at run time, and I would think that I have it all squared away. However when I construct my EF entities object it throws an exception and I can't figure out what I am...
16 Apr 2011 by DannyStaten
Ok I found my problem. I coppied my connection string straight from an app.config. The culprit was the " in the two places it was showing up. Changing it to 'data source={0}' solved the issue.
19 Sep 2015 by Member 11594357
can you please write the final connection string needed?im in the same problem..
23 Oct 2020 by SuperMiQi
Hello Everyone, Hope all of you are doing well and safe. I have a curious issue related to a sequence of sql statments using sqlite. I have a table [geometries] and a table view [FlagsGeometries]. When I do the following sequence: 1. ...
23 Oct 2020 by OriginalGriff
A view is stored as a precompiled SQL statement that relates to a specific table source - when you deleted it, that source no longer exists, and the view develops a fault. In order to delete the underlying table, you have to delete the view...
21 Apr 2014 by Sor Emi
In my Wpf VS application with SQLite, I want to use my old data sheet,whose entries are of something like an hierarchical structure below :Field name (F1 F2 F3 F4 F5 F6) Cell contents (x y z * * *) about 50,000 rows, string type The number of...
21 Apr 2014 by Manas Bhardwaj
I would suggest that you buy a good basic SQL book and go through it. It will help you to get most of the answers. And not only for this question, but for the future.Understanding of data modelization always helps.Coming back to you question. It's a small 6 columns table (datasheet). So,...
5 Jun 2021 by Private Dobbs
How to initialise a database and then automatically keep it up to date with version releases
26 Jan 2016 by Jörgen Andersson
A propertymapping extension for DataReaders
23 Dec 2015 by Md. Marufuzzaman
A simple tip/trick to get rows on n’th maximum number from a table
6 Jun 2014 by Azim Zahir
This is a simple demonstration of using SQLite database in Android.
18 Dec 2015 by Md. Marufuzzaman
A simple example of Microsoft SQL Server Pad String
14 Jul 2011 by manchukuo
Hello guys!I have a program that uses some threads at the same time that retrieve a page, wait for response, parse the response and then save the data in a DB using Sqlite.Now when i want to close my program and there are these threads running it takes some time so it closes. how can i...
14 Jul 2011 by #realJSOP
Use the asynchronous reader execute methods (BeginExecuteReader/EndExecuteReader instead of ExecuteReader, for instance).
16 Jul 2011 by Philippe Mori
I would say hide the form until the operation is completed and then close it. This would be adequate if the wait is at most a few seconds and then intend is to make it appears responsive...BackgroundWorker can also be used and cancelled... Assuming that you can check for cancellation often...
10 Jun 2018 by Nishikant Tayade
I am trying to create a new SQLite database file if it doesn't exist,But every time it is throwing an exception that access is denied. I tried path of different drive,but then it creates an empty database file without any table. and the user may not have the another drive,hence was trying to...
10 Jun 2018 by User 7429338
Windows doesn't allow you to write to the root of the C:\ drive. You could put your database in %appdata% or the user's Documents folder, depending on what makes sense.
10 Jun 2018 by OriginalGriff
To add to what Thaddeus Jones - very correctly - said, see here: Where should I store my data?[^] - it shows some better places, and how to use them.
10 Jun 2018 by Jochen Arndt
The root path of the Windows drive is owned by the system and has restricted access. Select a different path where the user running your application has write access. For application related data these are the predefined application data folders for all (common) or each user (depending if the...
27 Oct 2014 by Dominick Marciano
When iPhone SMS messages are backed up to your computer using iTunes, the messages are stored in a SQLite database. This article will show the layout of this database file and how to access all saved message information.
27 Apr 2014 by Sujeet KC
I'm new to Android development and have certain issue which is troubling me a lot, and worse is I haven't found the answer to it yet.Requirement:1.) I'm developing Android app using eclipse as my base IDE. I have my data safely residing in SQLserver 2008. I don't want to use...
28 Apr 2014 by Hitesh Varde
Hi,you need to use JDBC drivers for doing what you need,Please refer how-to-connect-and-access-sql-database-server-from-android-app/[^]Let me know if it helps.Thanks,Hitesh Varde
3 Mar 2015 by Member 11497251
Hi Sujeet KC, I am in the EXACT situation as you were! I couldn't describe the question as good as you did. May I ask you if you found a correct answer to your question? thanks, David.
6 Feb 2019 by Desintrinski
I'm trying to generate InsertCommand to SqliteDataAdapter but got this error: Unhandled Exception: System.InvalidOperationException: Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information. What I have tried: using...
6 Feb 2019 by Maciej Los
I'm not sure if it fits to SQLiteCommandBuilder, but MSDN states: Quote: The DbCommandBuilder must execute the SelectCommand in order to return the metadata necessary to construct the INSERT, UPDATE, and DELETE SQL commands. As a result, an extra trip to the data source is necessary, and this...
24 Feb 2015 by Member 11360293
I have sqlite implemented in my xcode project. It gets its data from a UITextField. There is a texField that gets added programmatically everytime the user clicks a button. I will be recreating the 'same' textField. (Kind of.) How can I get the textField's data to the sqlie file?SQLite...
24 Feb 2015 by KarstenK
You will only get the text-string of your textfield in the database. If you have a varying count of textfields you must save the count or some logic would should recreated.You need to run an INSERT QUERY on SQLite.
21 Jun 2012 by amarasat
I want to add the value of my CString into the datbase i already created.CString textvalue = _T("DarkKnight");const char *pSQL[1];pSQL[0] = "insert into Movies (Title, Director, Year) values (''+textvalue+'', 'Nolan', 2008)";int rc = sqlite3_exec(database, pSQL[0], callback, 0,...
21 Jun 2012 by enhzflep
Here's the code I use in a C++ cgi module.sprintf(buffer, "INSERT INTO `cds` (title,artist,year) VALUES('%s','%s',%d)", bTitle.c_str(), bArtist.c_str(), yr);queryStr = buffer;db.exe(queryStr);At a guess, it looks like you've used mySql before in PHP from the way you expect to have...
19 Aug 2013 by prabu19
Hi frnds, I know how to add sub item to listview by using hashmap.But in hashmap, I added the values manually.Now I want to add values from the database.how can i achieve this...Thanks in Advance
15 Jun 2011 by Cool Smith
I have to add items to database, but need to make sure that one item is unique. what do i do here?e.g lest say i need to add 100 rows of three columns each (school name idcard_num)it is obvious that name should be unique here, while the rest can have duplicates1 should i create a...
15 Jun 2011 by CS2011
i will suggest you to go with approach 1 but do not throw the exception as it is.Check it before like if it's related to unique key display a proper message saying "Name already exists in the database."
15 Jun 2011 by walterhevedeich
Checking all the items before adding will be an overhead. I suggest you go with #1. Just make sure to handle exceptions properly so users will not freak out when they see technical errors. :)
22 Dec 2017 by Dirk Bahle
Tips & Tricks on loading and saving WPF Tree View based content.
18 Sep 2020 by stevenlam505
I am trying to create a script that takes ALL the information from a SQLite database and store them into lists that are stored inside of dictionaries. I am able to add to my lists stored inside the dictionaries, however all my stored values just...
18 Sep 2020 by OriginalGriff
When you call ToString on anything the system looks at the instance you are calling it on, and goes back through the inheritance chain to find the "closest" implementation. If your class explicitly implements ToString then taht method will be...
22 Jun 2023 by Member 8840306
I am new in data base phpmyadmin Here my query that is giving error ALTER TABLE students ADD CONSTRAINT fk_enrollment_student FOREIGN KEY (student_id) REFERENCES enrollments (student_id); Here are structure of my table table 1 table 2 table...
22 Jun 2023 by k5054
I think you have your relationship between students and enrollments backwards. As written, you are trying to construct a dependency for the students table on enrollments. I.E. every student must have one and only one enrollment. This...
3 Aug 2014 by henry sentio kauta
The Android operating System in action
11 Nov 2015 by Floyd Pinkertons
So for my android application i can successfully insert an image to sqlite as a string. But im not sure exactly how i can retrieve this image from the database and convert it to a Image and display it in my app. Stuck for weeks, help appreciated! :(// Button Click saves image to sqlite...
11 Nov 2015 by Abhinav S
These links should help you -Video - store images in sqllite[^]Saving An Image in a SQLite Database in Your Android Application[^]Storing images in SQLlite[^]
15 Mar 2019 by sfdgasdfqqqq
I am receiving SMS containing the data I needed such as latitude and longitude. I have successfully parse the SMS body and saved in into the database. I wanted to retrieve the stored coordinates and display it on Google Map. What I have tried: I am new to Android. Can you advice me what to do?
15 Mar 2019 by Ravi Bhavnani
Here's one way to do this: // Create a Uri from an intent string. Use the result to create an Intent. // Example latitude = 46.414382, longitude = 10.013988 Uri gmmIntentUri = Uri.parse("google.streetview:cbll=46.414382,10.013988"); // Create an Intent from gmmIntentUri. Set the action to...
15 Mar 2019 by Afzaal Ahmad Zeeshan
You would need to use the Google Maps SDK for Android for that, since you have gotten the latlong coordinates, you can use the Java code to render that. Remember that you need to have a Google Maps API key for this to work, as Google's native Maps app would need you to call it from an...
24 Mar 2013 by Sandip.Nascar
Describes the power of C# in building professional application - Stock Market Watch with Charts on Android platform using Mono C#.
13 Jun 2013 by Deepali Dhingra
This tip explains how to create a to do or Shopping List app with listview, sqlite, dialog and customadapter.
7 Nov 2020 by miss noOona
I'm new to android and not much aware about it. I need to connect the android studio to SQLite , in the android studio i made an app that take a text field and insert the data SQLite ,I wrote the following code in the main activity package...
7 Nov 2020 by raddevus
The only thing that would happen in the app you've shown is that the Main Activity would load and display something due to the OnCreate being called: protected void onCreate(Bundle savedInstanceState) { ...
14 Sep 2014 by Varavut
Lean about how to manage the data
13 Jun 2014 by Right Handed Monkey
This is a tutorial for accessing sqlite databases in Android in a thread safe manner. If you download the library code, please bookmark, comment on, or rate the article - it helps out tremendously.
16 Oct 2014 by Pavel Durov
Article about dynamic Sqlite database management on Android platform using Java class reflection.
26 Feb 2013 by Confucius II
Hi I'm new to this so please be patient. I'm attempting to develop an Android App using a SQLite Database. I have developed a database Helper class to create and upgrade the database already.What I want to know though, is do I need to write separate 'Update', 'Inserts' and 'Deletes' for all...
28 Feb 2013 by zapbuild
If you are making the project using 3-tier architecture then u can do it by jst giving the statement once in the business logic layer and then u can call the business logic layer in the Data Access Layer with which u need to write the query once and u can call the tables automatically. so go...
27 Nov 2012 by karthikmandadi@gmail.com
Hi,This is karthik , my problem is maintaining sq-lite DB in mobile, I appreciate in advance for your answers.I am using HTC Sensation mobile for development. I have created a DB and 10 Tables along with few DML operations in it. The problem is , it is working well some times in mobile...
29 May 2014 by Nagesh Reddy
Hi, I have two different SQLite tables and i want to upload data into two tables at the same time with out any deadlock. I tried but only one table is getting to update and once first one will complete then only second table is getting to update. So if i want to insert data into two tables...
29 May 2014 by CHill60
You may be able to utilise threading and update each table on a different thread - don't know if SQLite will allow that though. This google search[^] has several articles and posts on threading with SQLite on Android
22 Mar 2015 by Member 11522447
I have a sqlite database that the user can register to! I have successfully created a login form and when the login is successful (username & password match the database's) the user is redirected to another activity. What i want is in the activity that the user is redirected,to display his...
22 Mar 2015 by Peter Leow
A walk through of the following code snippets:1. in the LoginActivity:// create a bundle object to store user's dataBundle bundle = new Bundle();// assign the values as key-value pairsbundle.putString("username", username);bundle.putString("email", email); // create the...
25 Feb 2012 by Msaya
Hello :)I have an application that uses SQLite databasebut how to publish the database when I create .apk file ?should I put it on some server ?any advice ?thank you all :)
26 Feb 2012 by sobingt
You can Create a exported flat file, Ship it as a raw file in your apk package,Run a import on first time load.There is a tutorial that may help http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
26 May 2014 by Pritesh Aryan
What i am trying to do is produce multiple columns .csv from single SQLite Table this is very clear in [This Image]What should be the best way please suggest me. i have searched google but can only find way to convert whole table in to .csv but can't find How to produce SQLite to Multiple...
10 Feb 2017 by Jerod Johnson
Use the CData Software API Server to create an OData service for your databases and build a dynamic Web app based on the database data.
11 Oct 2011 by anjankant
Hello,Can you suggest that how can we protect our websites & databases from heckers that we have developed applications in ASP.net, PHP, HTML etc.Thanks the hope for the best answer.
11 Oct 2011 by mhamad zarif
The best way to make you google for this is to hack your website so you then will go to search on techniques to find solutions.
11 Oct 2011 by Simon_Whale
Best one that I can suggest that you do is make sure that you have protected yourself against SQL Injection[^]Make sure your web site / application has only the rights that it needs on your network and nothing more.
19 Aug 2019 by VISWESWARAN1998
An opensource antivirus engine which uses Yara, Locality Sensitive Hashing to detect malware
9 Feb 2014 by Mike Hankey
I've got an application that I've converted from using db4o.Linq to SQLite and I'm trying to write a data migration application to migrate existing data from db4o DB to a new SQLite DB.I've basically copied over all my Model and Business Logic/Access tiers to the new migration application...
3 Dec 2012 by ranjith sankar
I am using mac os for android development. i am using SDK_ADT Mac Os bundle from android developers. for development.is there any tool for viewing the tables that i created in android.
7 Dec 2012 by AndroidVivek
You can use cmd prompt in mac and the best is to use sqlite plugin if you are using eclipse ,youcan find that in web and another solution which basically in large project using is sqlite manager tool...you can also get that tool in web..
13 Jan 2021 by A. B. Dinshaa
1. List all the directors who directed a film in a leap year by using SELECT statement 2. Find the film(s) with the largest cast using SELECT statement) ACTOR (aid, fname, lname, gender) MOVIE (mid, name, year, rank) DIRECTOR (did, fname,...
3 Jun 2020 by OriginalGriff
We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us...
4 Jun 2020 by RickZeeland
Take a look at: Python MySQL[^] to learn how to create a database and then create the tables.
19 Jun 2020 by CHill60
Alice Norman wrote in a comment: For #1: SELECT * from DIRECTOR WHERE did in (SELECT did from MOVIE_DIRECTOR and MOVIE WHERE MOVIE.year/4 = 0) As leap year is one that when divided by 4 result is 0 It is not true that a leap year is one where the...
18 Jun 2020 by Haris Memon
import sqlite3 as sql conn = sql.connect('test.db') c = conn.cursor() #1. List all the directors who directed a film in a leap year by using SELECT statement for row in c.execute("""SELECT fname, m.year from director d ...
19 Jun 2020 by tara lara
Hello. I am making a database using SQLite. Then I need to make an API with functions that returns information about that database. Then I need to print out a report. However, when I try to return an answer to a query using inputs, nothing is...
19 Jun 2020 by Garth J Lancaster
In infoB function, def infoB(year, sem): return cursor.execute("SELECT * FROM COURSES WHERE sem_year = ? AND semester = ?", [year, sem]) why are there square brackets [] around the parameters year,sem ? ... Does it work like this ? ...
23 Mar 2021 by Sanit Sharma
If there is validation for URI null value, then the real error can be pointed!
10 Mar 2015 by S.Rajendran from Coimbatore
On click of 'getDetails' button I want to get details using substring from a column. There is no error in my code but I feel there should be some wrong in the db.query.Can some one sort it out?public void getDetails(View v){ String s1=name.getText().toString(); String...