Categories
User Help Web Apps

Unable to insert values in Database

I have develop database in android but my problem is data is not inserting as below code. Any answer to my query is highly appreciated. DatabaseHelper package com.example.mjpinventory; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import androidx.annotation.Nullable; public class DatabaseHelper extends SQLiteOpenHelper { private static final int VERSION = 2; public static […]

Categories
Mastering Development

IndexOutOfBound Exception while setting the data in recyclerview from sqlite database

I am fetching data from sqlite and filling it into recyclerview, but while filling the data i am getting IndexOutOfBoundException in my logcat. Can anyone tell me why i am getting this exception ? Databasehelper class code: public class DatabaseHelper extends SQLiteOpenHelper { public static final String DATABASE_NAME = “history.db”; public static final String TABLE_NAME […]

Categories
Development

How to insert values with Foreign KEY in SQLite?

I am new with Android Sqlite Database. I have created a database with SQLite in Android and I have a table Student_details which use a foreign key of the table: Student, I have made the id as AUTOINCREMENT. And i tried to return the value of the AUTOINCREMENT Id from Student table. But I am […]

Categories
Development

android studio java database login problem

I’m a beginner, and I want to ask about a problem I’ve got with my app. I try to log with the data I put into the database but it recognizes nothing. Here’s the code of the DatabaseHelper Java file. I think the problem is with my checkData_pseudo_pass function. Thanks in advance for the response! […]

Categories
Development

Is there a way to format date from excel recordset

I get data from SQL Server and now I want to copy it in Excel worksheet. I try to format “start_date” but it apply format only on the first column, all other display as stored in SQL Server. Could you please suggest code modifying? Sub ReadMBDataFromSQL() Dim Server_Name, Database_Name, User_ID, Password, SQLStr As String Set […]

Categories
Development

How can I maintian historical details from many table’s information schema and account info?

I need to be able to extract the schema and account information for historical purposes for minimum of 10 years planning. This is what I am using for selecting the query history, I would like to make a task to save it to a table. Create TABLE TEMP_history(Query_id varchar, query_text varchar, database_name varchar, schema_name varchar, […]

Categories
Development

How to check if the text inserted in editText exist in SQLite database then return a message if it exist and if not return different message

i’m new to programming, i’m trying make an app that creates an SQLite database, adds a table to said database, allows me to update the table and view the data inserted into it. then, i want it to check if the text (for example a name) i insert into editText exists in the database and […]

Categories
Development

I want to delete specific data from ‘SQLITE-DATABASE’ but it is noT working

i hope you will be all fine.. i have a problem in sqlite databasse in android i want to delete specifci data from sqlite databse through cardview in android but it is not working when i uninsatll the app and again install it in mobile first time the data hase been removed but after that […]

Categories
Development

SQLite error inserting constraint field – why?

I am new to android programming and using SQLite. I am trying to insert into a database called “menu” which has a table called “items”. The attributes of this table are “name” and “price” which are text and real respectively. (I would like to apologize for all the code, but I figure these will be […]

Categories
Development

Using multiple tables in SQLite

I am using two tables for my application. tbl_users and tbl_tasks, I can access tbl_users without any problem, but when I use tbl_tasks it keeps on crashing the app. The contents are both the same in the two functions, just the table_name is different. DatabaseHelper.java public class DatabaseHelper extends SQLiteOpenHelper { public static final String […]