Xamarin and Maui Sql Server (SSMS) Connection

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 59

  • @syedwajahat2135
    @syedwajahat2135 4 дні тому

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

  • @2005Azm
    @2005Azm 3 роки тому +2

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

  • @АндрейДмитриев-ъ6м
    @АндрейДмитриев-ъ6м 7 місяців тому

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

  • @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

  • @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.

  • @JetSettR
    @JetSettR 2 роки тому +1

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

  • @knad9752
    @knad9752 2 роки тому +1

    This is so underrated. You're amazing

  • @samianouar2958
    @samianouar2958 3 роки тому +1

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

  • @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

  • @RodandoLaVidaX
    @RodandoLaVidaX 11 днів тому

    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.

  • @yaser107
    @yaser107 2 роки тому +1

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

  • @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 2 місяці тому

    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 Місяць тому

      Encontraste alguna solucion?

    • @RodandoLaVidaX
      @RodandoLaVidaX 11 днів тому

      @@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

  • @rajasundaram9890
    @rajasundaram9890 Рік тому

    nice work it
    🥳🥳🥳

  • @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.

  • @gyanisharma1942
    @gyanisharma1942 2 роки тому

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

  • @islamicstatusofficial6670
    @islamicstatusofficial6670 Рік тому

    Thanks a lot. best tutorial

  • @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.

  • @mohsenkadm5028
    @mohsenkadm5028 3 роки тому

    how can i secure my connection string ??

  • @engadnanturki9345
    @engadnanturki9345 3 роки тому

    Hi how can use it with ios app

  • @SureshBabu-px2yt
    @SureshBabu-px2yt 3 роки тому

    Shall I create APK and use in mobile

  • @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.

  • @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.

  • @ferencferenc4913
    @ferencferenc4913 2 роки тому

    Unfortunately it does not work with iOS devices. :(

  • @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 11 місяців тому

    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 9 місяців тому +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 Місяць тому

      @@arastunasimsek8992 Solution?

  • @rdvansunger5607
    @rdvansunger5607 2 роки тому +1

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