C# SQL 数据库控制台应用程序 [英] C# SQL database console application

查看:86
本文介绍了C# SQL 数据库控制台应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对控制台应用程序不是很熟悉,但我认为这是一个值得学习的有趣主题.我搜索了与在控制台中连接 MySQL 数据库相关的教程和参考资料,但没有成功.所以我只是尝试和错误.请纠正我我错了..

I'm not very familiar with the console application but i think its kind a interesting subject to learned. I searched for tutorials and references related to connecting MySQL database in console but no luck. So i just try and error. Please correct me I'm wrong..

我有一个应用程序,当用户运行该程序时,它会将值存储到数据库中.在表单应用程序中,它运行良好(毫无疑问).现在使用相同的方法,我希望它在控制台应用程序中运行.所以,我在控制台中创建新项目,然后复制,对代码进行一些编辑并放入 Main.幸运的是,代码运行良好.

I had an application where when user run the program, it'll store values to database. In the Form Application, it runs well(no doubt). Now with the same approach, i want it to be run it in the console application. So, I create new project in console and just copy, do some editing on the codes and put in Main. Luckily, the code running well.

我担心的是,我正在做的是写作吗?表单的命令可以在控制台中使用吗?这两者有什么区别?这是更好的方法吗?

任何建议和参考都非常有帮助.

推荐答案

控制台应用程序通常在设计时没有图形用户界面.控制台应用程序从命令行运行,输入和输出信息在控制台窗口之间进行交换,这使得控制台应用程序成为学习新编程技术的好方法,而不必担心用户界面.

Console applications are typically designed without a graphical user interface. A console application is run from the command line with input and output information being exchanged between to and from the console window, this makes the console application a great way to learn new programming technique without having to be concerned with the user interface.

这篇关于C# SQL 数据库控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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