Xamarin and Maui Sql Server (SSMS) Connection

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025

Комментарии • 60

  • @АндрейДмитриев-ъ6м
    @АндрейДмитриев-ъ6м 9 месяцев назад

    THANKS YOU SOOOOOO MUCH! MEN YOU SAVED MY LIFE AHAHHAAH
    I'll have a celebration in your honor tomorrow

  • @syedwajahat2135
    @syedwajahat2135 Месяц назад

    Hunting for this solution since last 6-7 months. Thanks

  • @2005Azm
    @2005Azm 3 года назад +2

    Fantastic !! This is one of your very best tutorial !!

  • @superguitar6784
    @superguitar6784 Год назад

    my friend do you really was saved my life with you tutorial because i was search for hours one video who can explain that like this and men , you are the best ! thanks again my friend

  • @saeednajmddin7676
    @saeednajmddin7676 Год назад +1

    Why I am getting this error:
    Microsoft.Data.SqlClient.SqlException
    Message=A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 26 - Error Locating Server/Instance Specified)

  • @mdottech6502
    @mdottech6502 2 года назад +1

    Superb way to explain , Very nice keep it up bro

  • @knad9752
    @knad9752 2 года назад +1

    This is so underrated. You're amazing

  • @RodandoLaVidaX
    @RodandoLaVidaX Месяц назад

    Nota importante: Sólo funciona con la versión system.data.sqlclient v4.8.2 (quizá tiene un bug), y sin duda es mala practica acceder directo a sql server, pero el ejemplo es muy educativo.

  • @CaliforniaSoftware
    @CaliforniaSoftware 3 года назад +1

    Hi
    Is it better to use an API? Or will this work. I can connect my maui app directly to sql db. Im not sure if it is a good design. But it means we don't need to build an API. All mobile clients can talk directly to SQL database using a connection string over internet.

    • @xamaringuy1951
      @xamaringuy1951  3 года назад

      Yes of course :) But api are used to connect with multiple devices on multiple areas where as direct SSMS connection is confined with same place over shared internet.

    • @saberint
      @saberint 2 года назад

      Never do this! This is a horrible example and is exactly what not to do. You need an API. Yes it’s more work, but here he has opened SQL to attacks and removes any business logic. You mobile app will contain the username and password to your server. 30 seconds of decompiling will give a hacker access to your database. Furthermore this is horribly expensive as each query connects and authenticates before the query can be executed. An api allows you to use a connection factory which reuses connections. Done the way he does it here, each connecting device is another connection. Honestly you could write a whole book on why not to do this.

  • @samianouar2958
    @samianouar2958 3 года назад +1

    That's great thank you.
    A question if you allow: can we call a sql server SP ?

  • @yaser107
    @yaser107 2 года назад +1

    this not working om maui it works in xamarin forms only have you tested it on maui

  • @rajasundaram9890
    @rajasundaram9890 Год назад

    nice work it
    🥳🥳🥳

  • @JetSettR
    @JetSettR 2 года назад +1

    Hello. Will it also work with the 'Developer' version of SQL Server?

  • @MsMalcolmX
    @MsMalcolmX 2 года назад +1

    Why you dont show if his works?

  • @AbdulAziz-xi1lo
    @AbdulAziz-xi1lo 2 года назад

    can you help to get the same connection in Blazor MAUI I TRIED BUT ITS NOT WORKING

  • @MGmyGAMES
    @MGmyGAMES 4 месяца назад

    por alguna razon solo funciona cuando esta conectado a la misma red wifi. Si pruebo la aplicacion MAUI en el emulador Android si funciona, se conecta correctamente, si lo pruebo en un celular fisico conectado a la misma red WIFI si funciona correctamente, pero si el celular fisico esta conectado a otra red WIFI no me permite conectarme al SQL Server.
    Tu video esta muy bueno

    • @gerardoarielmendez5037
      @gerardoarielmendez5037 2 месяца назад

      Encontraste alguna solucion?

    • @RodandoLaVidaX
      @RodandoLaVidaX Месяц назад

      @@gerardoarielmendez5037 es porque cada red wifi es privada, para que se conecte desde otras redes wifi la bd deberia estar en un servidor que tenga permitidas conexiones remotas o en en todo caso abrir los puertos del modem de la red privada y permitir conexiones en el puerto 1433 que es el default de sql server

    • @joseadame6039
      @joseadame6039 Месяц назад

      Tenga la idea que es por la IP, por que debes conectarte a la IP del servidor en la que esta tu base de datos. En el ejemplo del video lo hace por que esta en la red local, lo que parece tu caso. Además es solo eductaivo, por ahí leí que es mala práctica por cosas relacionadas a al seguridad de tu servidor y de tu base de datos.

  • @islamicstatusofficial6670
    @islamicstatusofficial6670 Год назад

    Thanks a lot. best tutorial

  • @SalimAlmoslim
    @SalimAlmoslim 3 года назад +1

    thank you very much for this tutorial

  • @madraven37
    @madraven37 3 года назад +2

    Wow, Thank you, so basically, this method is for LAN connection only which doesn't require any internet connection? This is helpful, especially in the voting system within the school only and any other use cases apply. Any chance we could get the CRUD?? looking forward to it..👌👌

    • @xamaringuy1951
      @xamaringuy1951  3 года назад +2

      We can make lots of small scale apps with in the organization. And this mobile apps needs internet connection for sure as it needs sql server IP address to be connected. But the main advantage is you can visualize the database and manipulate it with your own. CRUD Is the next part. 🙂

    • @madraven37
      @madraven37 3 года назад

      Looking forward to it, TIA..

  • @airtonlj
    @airtonlj 3 года назад +2

    Gostei muito! Aguardando a continuação, seria possível enviar uma consulta e obter o resultado em um datatable? Esta mensagem é do Brasil!

    • @xamaringuy1951
      @xamaringuy1951  3 года назад

      Yes, It's possible please wait for the next video.

  • @valimaties5789
    @valimaties5789 2 года назад +1

    A lot of wrong explanations here... Hard coded strings of connection is a WRONG approach, using Open() instead of OpenAsync() (why do you use Open()????), wrong settings for SqlServer as well... I don't know what to say about your video, but definitely, it is not a good setup!

    • @xamaringuy1951
      @xamaringuy1951  2 года назад

      I respect your thought. I am getting synchronized data and want to load my large data at first then only show my UI.
      I agree Open Async() is what need to be used

    • @valimaties5789
      @valimaties5789 2 года назад

      @@xamaringuy1951 OpenAysnc() is the way, getting data async, not synchronously and use an animated spinner to indicate that data is being received ;) Always use Async/Await, never block the UI.

  • @gyanisharma1942
    @gyanisharma1942 2 года назад

    My machine is not working SQL connection with visual studio and xamarin

  • @ferencferenc4913
    @ferencferenc4913 3 года назад

    Unfortunately it does not work with iOS devices. :(

  • @SureshBabu-px2yt
    @SureshBabu-px2yt 3 года назад

    Shall I create APK and use in mobile

  • @mohsenkadm5028
    @mohsenkadm5028 3 года назад

    how can i secure my connection string ??

  • @emrekbs
    @emrekbs 2 года назад

    using System.Data.SqlClient; not working in .NET MAUI for net6.0-android

    • @salahboual1902
      @salahboual1902 2 года назад

      Same here
      How did you fix the problem?

    • @rdvansunger5607
      @rdvansunger5607 2 года назад

      Same goes for me
      How Did you Fix the Problem?

    • @fadingserenade4365
      @fadingserenade4365 2 года назад

      Did you get it to work? if yes, can you tell me how'd you do it? Thanks!

    • @gokusan6169
      @gokusan6169 2 года назад

      same. but no solution yet. Recommendations like "use package Version 3.0.1 and cs parameter encrypt = false does not work.

  • @engadnanturki9345
    @engadnanturki9345 3 года назад

    Hi how can use it with ios app

  • @mdottech6502
    @mdottech6502 2 года назад

    Excuse Me Bro I am Getting this Error Can You Please help me to Fix this Problem Thanks A lot , I am Using With .net Maui Project.. "A connection was successfully established with the server but then an error pre-login handshake "

    • @gokusan6169
      @gokusan6169 2 года назад

      i have the same problem and did not find a solution yet.

  • @gyanisharma1942
    @gyanisharma1942 2 года назад

    Namaskar sir

  • @gyanisharma1942
    @gyanisharma1942 2 года назад

    Please help me

  • @ffs_999
    @ffs_999 3 года назад +1

    Lol, what is practical use of connection to SSMS on mobile app ?
    This is no sense, you should use your local sqlite.lol

    • @xamaringuy1951
      @xamaringuy1951  3 года назад +5

      The practice use case will be you will be creating Api with the sql database. Where as local SQLite.net is just for local storage of info.

  • @bengalsoftware8234
    @bengalsoftware8234 Год назад

    bad

  • @arastunasimsek8992
    @arastunasimsek8992 Год назад +2

    the new maui doesnt support fucking system.data.sqlclient. ı take this error always. I'm gonna break my computer ı swear !!!!! Microsoft.Data.SqlClient.SqlException: 'A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)'

    • @xamaringuy1951
      @xamaringuy1951  Год назад +2

      For windows and iOS app I was able to connect my sql clinet in dotnet Maui but there’s the issue with android.

    • @arastunasimsek8992
      @arastunasimsek8992 Год назад

      @@xamaringuy1951 when will they fix it ?

    • @sbjakhotya
      @sbjakhotya 11 месяцев назад +1

      same error to me also, trying to figure out since 1 month but still no luck. If anyone found the answer please share

    • @gerardoarielmendez5037
      @gerardoarielmendez5037 2 месяца назад

      @@arastunasimsek8992 Solution?

  • @rdvansunger5607
    @rdvansunger5607 2 года назад +1

    using System.Data.SqlClient; not working in .NET MAUI for net6.0-android