如何将Flutter App连接到SQL Server [英] How to connect Flutter App to sql server

查看:658
本文介绍了如何将Flutter App连接到SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

某些情况: Db已经存在,并且该应用程序仅供公司内部使用,这就是为什么我不使用API​​

大家好,我需要将我的应用连接到SQL Server才能执行查询并从中获取数据.

我已经尝试过使用此插件,但是没有成功 SqlJocky5

有人已经对扑打做了类似的事情吗?你是怎么做到的?还有另一个用于将应用程序与sql server连接的库? 所以,我要寻找的是是否存在像Xamarin Forms(SqlClient)或Android Studio Java(JDBC Driver)中那样的库

预先感谢

解决方案

我尝试提出一个问题,但由于未回答某些问题而被阻止.

以下是答案:

来自 https://groups.google.com/forum/# @Abner Hernandez的!topic/flutter-dev/GO9ilukcoN4

首先:您需要一个SQLServerSocket: https://github.com/nippur72/SqlServerSocket 是免费的和工作! 第二:您需要一个客户端 https://github.com/nippur72/SqlServerSocket (在DartClient文件夹中查找) . 我做了几次连接,效果很好.

当然,它不是易于使用,只需点击2或3次,并且编程更少...",但是,您可以实施简单的SELECT * FROM XXX并显示在Flutter上的两种设备(IOS和Android)上都可以得到结果."我做到了!!

是的,我使用远程SQL对其进行了测试,并且正在使用CRUD.我还没有测试广泛的查询.

günter-zöchbauer提供了最佳实践.

您应该使用AQUEDUCT aqueduct.io并创建一个Web API,以便您的Flutter应用程序更安全地连接到服务器.

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

Hi guys, 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)

Thanks in advance

解决方案

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.

这篇关于如何将Flutter App连接到SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆