批量记事本文件 [英] Bulk notepad files

查看:91
本文介绍了批量记事本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友!!!!

我想使用SQL Server作为数据库在C#中制作一个小型Windows应用程序,它在其中进行数据库操作:

它将多个记事本文件值上传到SQL Server数据库(SQL Server 2k8),
使用此应用程序,用户可以通过文件选择器选择本地驱动器上的多个记事本文件,并且记事本文件中的值将根据业务逻辑插入到SQL表中.
记事本文件包含这样的值(逐行):
'''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''
15024561
15025625
15025856
15025614
17:21:42
17:22:10

'''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''

说明:
'''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''
这是一个具有四个唯一ID的学生的记事本文件.我的意思是每个学生都有4个唯一的ID.现在每行的描述如下:

第一行包含唯一ID(A)
第二行包含唯一ID(B)
第三行包含唯一ID(C)
第四行包含唯一ID(D)
第五行包含测试开始的时间
第六行包含测试时间

'''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''

现在,我必须在C#中开发Windows应用程序,以选择多个包含学生信息的记事本文件,这些文件包含学生信息,并且单击上传"按钮会将记事本文件中的值插入SQL表中.

寻找与您一样的xc的用户提供的最佳简便方法帮助,每个人都说我对c#和sql服务器都是陌生的.

谢谢

hello friends !!!

I want to make a small windows application in C# with sql server as database in which it do:

it uploads the multiple notepad file values to the SQL Server Database (sql server 2k8),
Using this application user can select a multiple notepad files on local drive through file selector , and the values in the notepad files will be inserted in SQL tables as per the business logic.

the notepad file contains values like this(line wise) :
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
15024561
15025625
15025856
15025614
17:21:42
17:22:10

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Description:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
This is a notepad file for a student having four unique IDs. I mean every student would have 4 unique IDs. Now description of each line is as follows:

first line contains unique id (A)
second line contains unique id (B)
third line contains unique id (C)
forth line contains unique id (D)
fifth line contains time of test start
sixth line contains time of test over

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Now i have to develop windows application in c # to select multiple notepad files like these which contains student information and the values in the notepad files will be inserted in SQL tables by clicking the upload button.

looking for best easiest way help from u guys as the same xcuse everyone say i m new to both c# and sql server.

Thanks

推荐答案

This[^] might help you to get started.

You will also need to investigate the OpenFileDialog (search on MSDN or web)

If I were you I would have a go at that part first before attempting the Database part.

You can always ask again, if you get stuck.


这篇关于批量记事本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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