Results 1 to 6 of 6

Thread: i want to learn database prog with xamarin

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    193

    i want to learn database prog with xamarin

    Hi guys,

    I am interested on xamarin but im new and still beginning to learn. Can you provide simple mysql crud example to check it out and learn by example. tnx

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: i want to learn database prog with xamarin

    I would suggest that you search first, do what you can with what you find and then ask specific questions about what you don't understand.

    https://www.bing.com/search?q=xamari...ZYwzIeBvquxLkY

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    193

    Re: i want to learn database prog with xamarin

    Isnt there a crud sample in codebank?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: i want to learn database prog with xamarin

    Maybe, but Xamarin with MySQL is rather specific, so there's no guarantee and, even if there is, what are the chances of the person who posted it seeing this thread and providing a link? Have you searched the CodeBank forum(s) to see whether you can find one?

    Based on what I can find, it seems that CRUD access to MySQL from Xamarin is not possible by default. It seems that you need to either purchase a commercial ADO.NET provider or create your own web service.

  5. #5
    Lively Member
    Join Date
    Jan 2020
    Posts
    120

    Re: i want to learn database prog with xamarin

    Code:
    void deleteBtn_Click(object sender, EventArgs e)
            {
                if (crud.delete(selectedItem))
                {
                    nameTxt.Text = "";
                    adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, names);
                    lv.Adapter = adapter;
                }
            }
    
            void updateBtn_Click(object sender, EventArgs e)
            {
                if(crud.update(nameTxt.Text, selectedItem))
                {
                    adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, names);
                    lv.Adapter = adapter;
                }
            }
    
            void addBtn_Click(object sender, EventArgs e)
            {
                if(crud.add(nameTxt.Text))
                {
                    nameTxt.Text = "";
                    adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, names);
                    lv.Adapter = adapter;
                }
    
            }
    
            void lv_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
            {
                this.selectedItem = e.Position;
                nameTxt.Text = names[selectedItem].ToString();
            }
    
        }
    }
    C#

  6. #6
    Lively Member
    Join Date
    Jan 2020
    Posts
    120

    Re: i want to learn database prog with xamarin

    Code:
    void deleteBtn_Click(object sender, EventArgs e)
            {
                if (crud.delete(selectedItem))
                {
                    nameTxt.Text = "";
                    adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, names);
                    lv.Adapter = adapter;
                }
            }
    
            void updateBtn_Click(object sender, EventArgs e)
            {
                if(crud.update(nameTxt.Text, selectedItem))
                {
                    adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, names);
                    lv.Adapter = adapter;
                }
            }
    
            void addBtn_Click(object sender, EventArgs e)
            {
                if(crud.add(nameTxt.Text))
                {
                    nameTxt.Text = "";
                    adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, names);
                    lv.Adapter = adapter;
                }
    
            }
    
            void lv_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
            {
                this.selectedItem = e.Position;
                nameTxt.Text = names[selectedItem].ToString();
            }
    
        }
    }
    C#

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width