如何从单独的表单中将数据插入数据库? [英] How to insert data into database from a separate form?

查看:95
本文介绍了如何从单独的表单中将数据插入数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我知道也许我的问题很模糊,但我的想法如下:我有一个项目,老师可以添加,删除,打开现在,我想为学生单独写一个表格,他们可以在那里写信息,当他们提交注册时,应该把它存入教师应用程序的数据库中。我想知道怎么样我将数据从一个项目存储到另一个项目的数据库。它与普通插入相同,还是我必须做其他事情?提前谢谢!



我尝试了什么:



我做了一些研究,但我能找到的问题是如何将数据存储到数据库中,我知道如何做到这一点。

解决方案

使用基于服务器的数据库 - SQL Server或MySQL - 这正是它的设计目标。



你可以生产两个独立的应用程序,一个用于教师,一个用于学生,或一个应用程序,要求教师在访问高级功能之前登录。



您需要一台带有服务器的计算机安装用于托管数据库的软件,并且可以从每台PC访问该PC(它可以在同一个LAN网段上,也可以通过互联网访问 - 尽管由于您需要更多安全层来防止未经授权的访问,因此更难。) />


您可以从Microsoft免费下载SQL Server版本(Express版)进行开发: SQL Server下载| Microsoft [ ^

Hello,

I know that maybe my question is vague,but my idea was the following:I have a project where the teacher can add,delete,open the attendancelist and so on.Now,I want to make a separate form for the students where they can write their info and when they submit the registration,it should be stored into the database on the teacher's application.I would like to know how can i store data from one project to another project's database.Is it the same as the normal insert,or do I have to do something else?Thank you in advance!

What I have tried:

I have made some research,but all i could find to my question was how to store data into database,and I know how to do that already.

解决方案

Use a server based database - SQL Server, or MySQL - and that is exactly what it is designed for.

You can either produce two separate applications, one for teacher and one for students, or one app that requires a teacher to log in before accessing the "advanced features".

You would need a computer with the server software installed to host the database, and that PC should be accessible from each PC (it can be on the same LAN segment, or via the internet - though that is harder as you need more layers of security to prevent unauthorised access).

You can download a version of SQL Server from Microsoft for free (the Express edition) for development:
SQL Server Downloads | Microsoft[^]


这篇关于如何从单独的表单中将数据插入数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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