hey! great video. Could you please make a video for the same using a cross platform and a little more insight on the sql database on the google cloud platform?
I need help. I cant connect to my MySQL database and you don't describe how You do that. Because "server=server;user=user;password=password;database=database" does not help and I can't understand how to enter my parameters "localhost;root;1;database" wich I have.
In your case, if you're using an emulator or a physic device, the localhost it´s that cellphone (real or emulated), so you must enter the IP adress of your computer, you can gei it by typing the command "ipconfig" in the cmd panel.
Thanks for the clear & concise walkthrough, really appreciate it. Though when I try to install the Xaramin.MySQL.Data package I end up with an error telling me the package is not compatible with Universal Windows Programs. I'm building an Xaramin app targeting Windows, Android & iOS. Any ideas on how to solve this? My first thought was to use the regular MySQL.data.dll exclusively for UWP while using Xaramin.mysql.data.dll for Android & iOS. Though this is my first Xaramin app and I'm not familiar with how to segment the dependencies like that.
@@indierevo3495 Np, to any future readers the fix was to install Xb.db.Mysql & MySqlConnector packages on all projects. They use the exact same high level classes as the package shown in the video, you can still follow any MySQL in C# tutorial.
Followed the above tutorial but not able to connect to google cloud mysql database. I have used both the connection name and public IP address for the server name but keep getting error. Can you please show me what the server name should be. you do not show this in above video - just say get from google. - thank kindly
Hi, I use VS 2019 Community edition, at software version 16.7.7. Did you download the templates that are used for this type of project? You may need to run the VS installer first and pick the Mobile Development with .NET installation option.
await conn.OpenAsync(); throws an error: System.TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.MySqlConfiguration' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.PlatformNotSupportedException: Operation is not supported on this platform. at System.Configuration.ClientConfigPaths..ctor (System.String exePath, System.Boolean includeUserConfig) [0x00050]
i don´t understand why i need to write the code for connect with the database and after that delet it and write another code. You talk about google cloud, but i don't know what it is. Can u help me and explain better please?
Hey, nice job!! But I get an array error: System.IndexOutOfRangeException: 'Index was outside the bounds of the array.' My code is this: ArrayList data = new ArrayList(); ListView listView1; protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.activity_main); listView1 = FindViewById(Resource.Id.listView1); LoadData(); } and the method: private async void LoadData() { MySqlConnection conn = new MySqlConnection(Constants.connectionString); await conn.OpenAsync(); MySqlCommand cmd = new MySqlCommand(Constants.selectAllQueryHistory, conn); cmd.Connection= conn; MySqlDataReader rdr = cmd.ExecuteReader(); if(rdr.HasRows) { while (rdr.Read()) { data.Add(rdr[1]); } rdr.Close(); listView1.Adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, data); } } But I do not understand why I get an ArrayError. My Database has 8 rows but rdr[1] should be "itemName" in Database. Maybe you can help me?
I love it when I find a video and it's just exactly what I have spent three days looking for.
Glad it helped you out
good video i wish you would explained the database tables and structures as well
Thank you for the great and very clear video. You saved my time, thanks a lot
Thanks for the feedback. I'm glad the video helped.
hey! great video. Could you please make a video for the same using a cross platform and a little more insight on the sql database on the google cloud platform?
can you provide a video describing the google cloud setup for this exact same video and the same database you used in this video.
Great great video, very clear and helpful , thanks a lot.
I need help. I cant connect to my MySQL database and you don't describe how You do that. Because "server=server;user=user;password=password;database=database" does not help and I can't understand how to enter my parameters "localhost;root;1;database" wich I have.
In your case, if you're using an emulator or a physic device, the localhost it´s that cellphone (real or emulated), so you must enter the IP adress of your computer, you can gei it by typing the command "ipconfig" in the cmd panel.
Thank you so much!
You're welcome
Thanks for the clear & concise walkthrough, really appreciate it. Though when I try to install the Xaramin.MySQL.Data package I end up with an error telling me the package is not compatible with Universal Windows Programs. I'm building an Xaramin app targeting Windows, Android & iOS. Any ideas on how to solve this?
My first thought was to use the regular MySQL.data.dll exclusively for UWP while using Xaramin.mysql.data.dll for Android & iOS. Though this is my first Xaramin app and I'm not familiar with how to segment the dependencies like that.
Hey sorry I'me not sure how to fix that error, as I only develop for iOS and Android, not UWP.
@@indierevo3495 Np, to any future readers the fix was to install Xb.db.Mysql & MySqlConnector packages on all projects. They use the exact same high level classes as the package shown in the video, you can still follow any MySQL in C# tutorial.
This tutorial is for Android Xamarin, not for Xamarin.Forms.
please if possiable add another video for authentication used in xamarin login form using mysql or other dbs thanks!
GOOD STUFF! WAY BETTER AND EASIER TO UNDERSTAND!
Glad it helped!
Followed the above tutorial but not able to connect to google cloud mysql database. I have used both the connection name and public IP address for the server name but keep getting error. Can you please show me what the server name should be. you do not show this in above video - just say get from google. - thank kindly
What version of Visual Studio you are using? because in my project I don't get the activity_main.xml file. Thanks for your help.
Hi, I use VS 2019 Community edition, at software version 16.7.7. Did you download the templates that are used for this type of project? You may need to run the VS installer first and pick the Mobile Development with .NET installation option.
await conn.OpenAsync(); throws an error: System.TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.MySqlConfiguration' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.PlatformNotSupportedException: Operation is not supported on this platform. at System.Configuration.ClientConfigPaths..ctor (System.String exePath, System.Boolean includeUserConfig) [0x00050]
I have error keywood not supported. How fix it?
i don´t understand why i need to write the code for connect with the database and after that delet it and write another code. You talk about google cloud, but i don't know what it is. Can u help me and explain better please?
What part of the video do you mean? Can you send me the time that this "delete" code appears at?
@@indierevo3495 nvm, you just used "#region" and I didn't know that ahahah
No problem, glad you figured it out :-)
Hey, nice job!!
But I get an array error:
System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'
My code is this:
ArrayList data = new ArrayList();
ListView listView1;
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.activity_main);
listView1 = FindViewById(Resource.Id.listView1);
LoadData();
}
and the method:
private async void LoadData()
{
MySqlConnection conn = new MySqlConnection(Constants.connectionString);
await conn.OpenAsync();
MySqlCommand cmd = new MySqlCommand(Constants.selectAllQueryHistory, conn);
cmd.Connection= conn;
MySqlDataReader rdr = cmd.ExecuteReader();
if(rdr.HasRows)
{
while (rdr.Read())
{
data.Add(rdr[1]);
}
rdr.Close();
listView1.Adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, data);
}
}
But I do not understand why I get an ArrayError.
My Database has 8 rows but rdr[1] should be "itemName" in Database. Maybe you can help me?