14

Some context: The Db already exists and the app is for internal use of the company, that's why I'm not doing an API.

I need to connect my app to an SQL server to execute a query and retreive data from it.

I've already tried with this plugin but no succes SqlJocky5

Someone have done something similar already with flutter? How you did it? there's another library for connecting the app with a sql server? So, What I'm looking for is if there's a library to do it like in Xamarin Forms (SqlClient) or in Android Studio Java (JDBC Driver).

7
  • SqlJocky5 is driver for MySQL not SQL Server there is no SQL server for dart as far as i know but help me to understand why you are not doing an API ? Commented Jul 12, 2018 at 2:28
  • @RaoufRahiche I'ts for a company that provides a finnancial services and more, i just started working there like a month ago and I really dont get to decide yet about the tech used. So instead of making an API by miself I have to use and existing server and Sql Database Commented Jul 12, 2018 at 2:43
  • 3
    "thats why im not doing an api" you mean hide the SQL server behind a REST API? You still should, even when it's only an internal app. Commented Jul 16, 2018 at 12:41
  • @GünterZöchbauer as I've explained before I'm an intern and I can't decide those things Commented Jul 16, 2018 at 12:46
  • 1
    groups.google.com/forum/#!topic/flutter-dev/GO9ilukcoN4 //please visit this google group link. I hope this link helps you. Commented Jul 21, 2018 at 5:08

1 Answer 1

17
+50

I tried to ask a question and I got block because I didn’t answer some question.

Here is the answer:

From https://groups.google.com/forum/#!topic/flutter-dev/GO9ilukcoN4 from @Abner Hernandez

First: you need a SQLServerSocket: https://github.com/nippur72/SqlServerSocket is free and works! Second: you need a client https://github.com/nippur72/SqlServerSocket (look in DartClient folder). I did several connections and it works very well.

Of course, it is not as "easy to use, with 2 or 3 clicks and less programming..." but yes, you can "implement a simple SELECT * FROM XXX and show the results on both devices (IOS and Android) with Flutter." I did it.!

Yes I tested it with my remote sql and is working on CRUD. I didn't test for extensive query yet.

günter-zöchbauer gives the best practices.

You should use AQUEDUCT aqueduct.io and create a web api so your Flutter app connects to the server more securely.

Sign up to request clarification or add additional context in comments.

9 Comments

then how can I connect aqueduct to mysql or oracle?
there is no SqlServerSocket.exe in SqlServerSocket.exe
@ThitSarNL have you found the solution to this?
Have anyone found sqlserversocket.exe??
@QaisarKhanBangash to get sqlserversocket.exe you need to pull above git's server project. then open it using visual studio (mine vs 2019). after open you can build exe your self by click on start button. this will create exe in bin folder in it
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.