SQLite in Xamarin Forms-Xamarin Forms in Hindi

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024
  • Welcome to Xamarin Forms Tutorials in Hindi In this video you will learn how to use SQLite in xamarin forms and how to create database and insert data.

ความคิดเห็น • 60

  • @islamicstatusofficial6670
    @islamicstatusofficial6670 ปีที่แล้ว

    Physical location of database file. Superb tutorial no doubt

  • @nghiepnguyen-fi
    @nghiepnguyen-fi 6 ปีที่แล้ว

    very good but it's pretty short. I hope idol give out more videos on sqlite.

  • @Milind48
    @Milind48 4 ปีที่แล้ว

    When I Click show data it shows nothing. What went Wrong ? Code as below
    ?xml version="1.0" encoding="utf-8" ?>

















    using SQLite;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Xamarin.Forms;
    using video33.Model;
    namespace video33
    {
    // Learn more about making custom code visible in the Xamarin.Forms previewer
    // by visiting aka.ms/xamarinforms-previewer
    [DesignTimeVisible(false)]
    public partial class MainPage : ContentPage
    {
    readonly private SQLiteConnection conn;
    public video33.Model.Student student;
    public MainPage()
    {
    InitializeComponent();
    conn = DependencyService.Get().GetConnection();
    conn.CreateTable();
    }
    private void SaveButton_Clicked(object sender, EventArgs e)
    {
    Student student = new Student();
    student.Name = Name.Text;
    student.Address = Address.Text;
    conn.Insert(student);
    Name.Text = "";
    Address.Text = "";
    }
    private void ShowButton_Clicked(object sender, EventArgs e)
    {
    var data = (from stu in conn.Table() select stu);
    DataList.ItemsSource = data;
    }
    }
    }

  • @chandrasekharpatra6317
    @chandrasekharpatra6317 3 ปีที่แล้ว

    How to encrypt sqlite db in xamarin forms....any idea....

  • @durgadevi2865
    @durgadevi2865 4 ปีที่แล้ว

    Nice

  • @smsoorganization292
    @smsoorganization292 6 ปีที่แล้ว

    thank you so much this helps me thank U thank U

  • @Iamvickysingh
    @Iamvickysingh 6 ปีที่แล้ว

    Sir I have got exception :Index was outside the bounds of the array(indexoutofrangeException)
    And one more error : NInterpret.InterpretedObject' cannot be converted to type 'System.Collections.IEnumerable'. (ArgumentException)]
    Plz help me sir to handle these exceptions

    • @SPTutorials
      @SPTutorials  6 ปีที่แล้ว

      Vikash Kumar put that code under try catch block and debug this code,note that from which line you are getting this exception.

  • @sonuaec
    @sonuaec 5 ปีที่แล้ว

    Hi how to copy our existing SQLite DB in All Plate form.

    • @SPTutorials
      @SPTutorials  5 ปีที่แล้ว

      You dont need to copy DB,as here I am creating SQLite_Android class inside android project,same create this class to your iOS,Windows project
      Database will automatically generate with platform basis.

    • @sonuaec
      @sonuaec 5 ปีที่แล้ว

      But in my case my db already exist with table and Data. So how I am use that dB

    • @SPTutorials
      @SPTutorials  5 ปีที่แล้ว

      @@sonuaec From where you get your DB file? if you already have your database then use it,simply executing sql query.

  • @RohitSingh-ze4jg
    @RohitSingh-ze4jg 6 ปีที่แล้ว

    i hope ,you will create complete project soon

    • @SPTutorials
      @SPTutorials  6 ปีที่แล้ว

      @Rohit, after completing Xamarin forms advance topics i will definitely create an App.so keep patient :)

  • @SaqibAli-do7yg
    @SaqibAli-do7yg ปีที่แล้ว

    where to save sqlite.db file in mobile .

    • @SPTutorials
      @SPTutorials  ปีที่แล้ว

      It saves under mobile package directory

  • @Milind48
    @Milind48 4 ปีที่แล้ว

    जब Show Data button पे Click करता हु तो कूछ भी नही दिखता है

  • @parvinderkumar5560
    @parvinderkumar5560 6 ปีที่แล้ว

    But I m confused....

  • @ashishgarggarg5379
    @ashishgarggarg5379 4 ปีที่แล้ว

    DependencyService.Get().GetConnection() return null object reference and application get crashed

    • @SPTutorials
      @SPTutorials  4 ปีที่แล้ว

      Add assembly info inside your sqlite android class

    • @ashishgarggarg5379
      @ashishgarggarg5379 4 ปีที่แล้ว

      @@SPTutorials already done that sir in android as well as in ios but still issue occur

    • @SPTutorials
      @SPTutorials  4 ปีที่แล้ว

      debug it properly,so that you will get actual error

  • @SaqibAli-do7yg
    @SaqibAli-do7yg ปีที่แล้ว

    when i run using vs 2022 it will run fine..Other wise crash the application.whats the reason

  • @barkhasingh9207
    @barkhasingh9207 3 ปีที่แล้ว

    thankyou * 200

  • @lyrical_magic__
    @lyrical_magic__ ปีที่แล้ว

    I made a login page for my project it's a music app ,i watched your video and get same error at var conn=new sqliteconnection(path)
    Pls help me out i also change dbpath and dbname as you told pls help me out it shows error as system.typeloadexception.'VTable setup of type sqlitepcl.sqlite3provider_e_sqlite3 failed'

    • @lyrical_magic__
      @lyrical_magic__ ปีที่แล้ว

      Pls help me out i have to submit the project

    • @SPTutorials
      @SPTutorials  ปีที่แล้ว

      Use sqlite-pcl-net library and follow same steps.

    • @lyrical_magic__
      @lyrical_magic__ ปีที่แล้ว

      @@SPTutorials pls can you elaborate a little i mean where to use it ? I have install nuget packages.i mean how to use sqlite-pcl-net library?

    • @SPTutorials
      @SPTutorials  ปีที่แล้ว

      Follow this article www.c-sharpcorner.com/article/working-with-sqlite-in-xamarine-forms-application/

  • @islamicstatusofficial6670
    @islamicstatusofficial6670 ปีที่แล้ว

    but where is database file

    • @SPTutorials
      @SPTutorials  ปีที่แล้ว

      Database file stored on that path which we declared while creation of connection. It will be a internal folder that you cant access, below android version 6 you can see but after that you cant.

  • @AbdulRehman-em7rq
    @AbdulRehman-em7rq 4 ปีที่แล้ว +1

    It was great. Can you tell me that how can i coonect already created sqlite with xamarin forms?

    • @SPTutorials
      @SPTutorials  4 ปีที่แล้ว

      using db name and db path

  • @ashishgarggarg5379
    @ashishgarggarg5379 4 ปีที่แล้ว

    How to save this json :
    {
    "status": "success",
    "data": {
    "name": "Ashish",
    "salary": "1",
    "age": null,
    "id": 85
    }
    }

  • @parvinderkumar5560
    @parvinderkumar5560 6 ปีที่แล้ว

    Thank you very much to upload this video

  • @sharmafamilykvideos
    @sharmafamilykvideos 6 ปีที่แล้ว

    very good . Please tell me How to use joins with multiple tables to Get Data like Sql server in sqlite.

    • @SPTutorials
      @SPTutorials  6 ปีที่แล้ว

      Hello,you can use your sql server queries as sqlite.the basic queries are universal so you can use joins same as sql server joins.

  • @codingislife6387
    @codingislife6387 4 ปีที่แล้ว

    Thanks Sir.

  • @dotcompany6774
    @dotcompany6774 6 ปีที่แล้ว

    How you have used this using android. assemblies in your project I am unable to find in my project

    • @SPTutorials
      @SPTutorials  6 ปีที่แล้ว

      Dear, can you tell me more details? are you asking for assembly references while writing platform specific codes?

  • @trqvinh
    @trqvinh 6 ปีที่แล้ว

    can you share code, please?

  • @ibha8345
    @ibha8345 4 ปีที่แล้ว

    When working with SQlite Visual Studio, work stops for what?

    • @SPTutorials
      @SPTutorials  4 ปีที่แล้ว

      see exeption message and find out the problem.

  • @TechnicalAkshay
    @TechnicalAkshay 4 ปีที่แล้ว

    sir as a beginner kiya me sqlite ko baadme seekh sakta hu? yaa ye abhi seekhna jroori he ? please please reply

  • @chandurajanreddy7424
    @chandurajanreddy7424 5 ปีที่แล้ว

    thanks mem...

  • @arjunkr92
    @arjunkr92 5 ปีที่แล้ว

    next try with sqlite-net sqlcipher

    • @chandrasekharpatra6317
      @chandrasekharpatra6317 3 ปีที่แล้ว

      How yo protect or encrypt sqlite db in xamarin forms.....plz help

  • @tanmaywankhede9873
    @tanmaywankhede9873 4 ปีที่แล้ว

    sir i m beginner ,how to show 3 records like name,address,email?how to show 3rd field like email.u show only 2 i.e name and address.what are the changes in MainPage.xaml?

    • @SPTutorials
      @SPTutorials  4 ปีที่แล้ว

      Fetch the columns that you need,and make sure that the base class should have that property then you can simply use this.

    • @tanmaywankhede9873
      @tanmaywankhede9873 4 ปีที่แล้ว

      @@SPTutorials yes i did .fetch the column and add property


      you show only name and address if i add email what are the changes in in textcell tag

    • @SPTutorials
      @SPTutorials  4 ปีที่แล้ว

      Dear,To show multiple data,use viewcell not textcell..If you are absolute beginners then you can join my online training.for more details contact +918444835044

    • @tanmaywankhede9873
      @tanmaywankhede9873 4 ปีที่แล้ว

      @@SPTutorials ok.thanku sir

  • @parvinderkumar5560
    @parvinderkumar5560 6 ปีที่แล้ว

    That ,,,, when does control find but you don't control find

    • @SPTutorials
      @SPTutorials  6 ปีที่แล้ว

      Dear, @myexpert_education I can't get it? can you explain briefly?

    • @parvinderkumar5560
      @parvinderkumar5560 6 ปีที่แล้ว

      SPTutorials..... मैंने एक वीडियो देखी ।। उस वीडियो मे उसने बटन,या, लेबल, etc , उसने बटन का कंट्रोल find किया।। लेकिन आप ने save बटन लिया तो उसका कंट्रोल find नही किया।।।।
      Txtsave = findViewById(save)(resources.Id.save)

    • @parvinderkumar5560
      @parvinderkumar5560 6 ปีที่แล้ว

      koi Institute hai jo xamarin sikhata jo...

    • @SPTutorials
      @SPTutorials  6 ปีที่แล้ว

      Dear @myexpert_education, in this video i have two button save & show,save button create the database connection and insert the data,and show button is for fetch the all data from database and store to a list and shown on ListView.This is very basic of SQLite.Next video you will learn more details about SQLite.If you have any doubt then comment here.