Posts

Showing posts with the label sqlite

How to Compare two date of birth in Android [duplicate]

How to Compare two date of birth in Android [duplicate] This question already has an answer here: I have two edit texts first one is date of birth(datepicker) second one is till today(datepicker). In that I want to compare both the date of birth. and I have one button named as Save when the two date of births are 18 years old or above then only it shows the toast msg saved successfully otherwise it shows Age must be 18 or above I hope you understand the question. Thank you advance. This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. What have you tried so far? You can cast the result of the datepickers to a Date object and simply subtract them, check if it returns at least 18 years and you're good to go – Laurens Jul 2 at 6:24 ...

online and offline manage images and show that in Viewpager without taking load

online and offline manage images and show that in Viewpager without taking load I have an app that runs online, if there is no internet that time not showing images in viewpager. I use this code to show image in imageview Picasso.with(mContext).load(sliderImagesId.get(i).getImageId()).error(R.drawable.microtube).into(photoView); now, I want to make that in offline support. i call API and show that images using Picaso Library so what i have to do to make offline view 1 Answer 1 insert and retrieve image from sqlite example link 1 another example for your kind knowledge Using above URL you got your answer, Good luck By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Intelij Windows 10 SQLITE Access denied

Intelij Windows 10 SQLITE Access denied This is a Java Project which connect to a sqlite database. I didn't really know where is the problem, I am making a login app to my manager here is my code : package dbUtil; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class dbConnection { public static final String USERNAME = "dbuser"; public static final String PASSWORD = "dbpassword"; public static final String CONN = "jdbc:mysql:\localhost/login"; public static final String SQCONN = "jdbc:sqlite:\dbname.sqlite"; public static Connection getConnection() throws SQLException{ try{ Class.forName("org.sqlite.JDBC"); return DriverManager.getConnection(SQCONN); }catch (ClassNotFoundException e){ e.printStackTrace(); } return null; } } And here is the error i found, i didn't know what exactly is happening: java.sql.SQLException: opening db: 'dbname.s...

Dissplay result sqlite query in textview

Dissplay result sqlite query in textview I tried to calculate a report and displays the result in the texview "edt1". But it's not displayed. there is mydatabasehelper : public void calculrapport(Argent a) { db = this.getWritableDatabase(); String query = "select sum(Entree) from Argent where date between "datedebut" and "datefin" ;"; Cursor cursor = db.rawQuery(query , null) ; int count = cursor.getCount(); } There is my class Rapport.java : public void onOKClick ( View v ) { if (v.getId() == R.id.okrapport) { EditText datedebut = (EditText) findViewById(R.id.datedebut); EditText datefin = (EditText) findViewById(R.id.datefin); String strdatedebut = datedebut.getText().toString(); String strdatefin = datefin.getText().toString(); Argent a = new Argent(); helper.calculrapport(a); edt1.setText( ); } } Thanks in advance. 1 Answe...

Java standalone application want to connect with azure [closed]

Java standalone application want to connect with azure [closed] I have created a java standalone application for windows and used SQLite as database and now I want to connect this application with Azure so that database can be saved on cloud Can anyone helps me how to do this ?? Let's make it simple I want to connect java standalone application with azure how to do this.. Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.