如何每天自动上传数据. [英] How to Upload the Data automatically daily.

查看:234
本文介绍了如何每天自动上传数据.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的专家!!

无法理解如何处理此问题.

我有一个铁路系统项目.

每天我都会收到.txt中的文本文件

我已经制作了一个程序,可以将数据从记事本上传到SqlServer数据库.最后它显示在gridview中.当我单击上传"按钮时.

现在,我需要将数据从记事本上载到sqlserver,并且它必须显示在Gridview中,而无需单击按钮.

请您能帮我解决这个问题.

我需要自动...每天,它应该将txt文件转换为sqlserver DB并显示在GRIDVIEW中.

谢谢.

Dear EXPERTS !!

Am unable to understand what to do with this problem.

I have a Project on Railway System.

Daily I will recieve the text files in .txt

I have made a program to upload the data from notepad to SqlServer Database. and finally it is displaying in gridview. when i click the Upload button.

Now i need to upload the data from notepad to sqlserver and it must display in Gridview WITHOUT UPLOAD BUTTON CLICK.

Please can you help me this problem.

I need it Automatically...Daily it should convert txt file into sqlserver DB and display in GRIDVIEW.

Thanks.

推荐答案

Hai,
对于日常运行的任务,您可以在sql server中创建一个作业,该作业将每天自动运行或按您设置的方式运行.

创建一个sis项目,以便将文本文件中的数据导入sql server,并在sql server作业中分配tat包后将其转换为包.

http://www.quackit.com/sql_server/tutorial/sql_server_agent_jobs .cfm [^ ]

SQL Server集成服务(SSIS)–第1部分:SSIS和创建程序包的基础 [
Hai,
For daily running task you can create a job in sql server it will automatically run daily or whatever you setting.

create a ssis project to import data from text files to sql server and convert it into package after that assign tat package in sql server job.. rrefer this links


http://www.quackit.com/sql_server/tutorial/sql_server_agent_jobs.cfm[^]

SQL Server Integration Services (SSIS) – Part 1: Basics of SSIS and Creating Packages[^]


您究竟如何接收此数据?
-您可以创建一个专用的电子邮件地址,以及一个用于检查该邮箱的小型服务,并且在确认其责任后,如果有包含这些数据的邮件到达,可以对其进行处理.
-如果您的数据提供商能够以这种方式为您提供数据,则您可以不时从外部网址获取数据并进行处理.

在您的情况下,这将是真正的自动化.但我不知道您如何想象自己的自动化.

您要在选择文件后立即在页面上自动发布表单吗?比您可以在这里使用JavaScript:
How exactly do you receive this data?
- You could create a dedicated email address, and a small service that check that mailbox, and if a mail with those data arrives, after verifying it''s liability, could process it.
- If your data provider is able to provide you the data this way, you could fetch your data from an external url from time to time, and process it.

This would be a real automatism in your case. But I dont know how you imagine your automatism.

You want to automatically post the form on the page right after you selected the file? Than you can use JavaScript like here:
<form action="upload.php" method="post">
<input type="file" onchange="this.form.submit()" name="myFile"/>
</form>


我不知道如何上传数据,上传.txt文件或其中的文本?
如果要在内部发送文本,则可以使用Windows服务,定义计时器并检查新的.txt文件,使用File.ReadAllText并将其存储到数据库中.
如果您提供更多详细信息,我们可以为您提供更多帮助
I don''t know how you upload data, upload the .txt file or the Text inside it?
if you''re sending the text inside, You can Use a Windows Service, Define a timer and check for new .txt files,use File.ReadAllText and store it into your Database.
if you tell more details we can help you more


这篇关于如何每天自动上传数据.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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