如何读取dat文件 [英] How to read dat file

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

问题描述

亲爱的先生,



读取.dat文件记录如下;



000001201301011000I
000001201301011900O

000002201301011900I

000002201301011900O



Emp_No- 000001

2013年

月-01

日期-01

时间 - 10000

进/出 - 我



注意银泰意味着我

工作时间意味着O



Oracle设计结构如下;



Emp_No年月日期时间输入/输出



在运行模式屏幕中如下;

浏览按钮并提交按钮。



当我点击浏览按钮从系统读取.dat文件时,我有一个名为的按钮提交。当我点击读取.dat文件的提交按钮并将其保存到oracle数据库中。





Asp中的设计.net和后端Oracle11g



Oracle数据库输出如下;





Emp_No年月日期时间输入/输出(来自读取.dat文件)



000001 2013 01 01 10000我







谢谢和问候,

Magesh。

Dear Sir,

Read .dat file record as follows;

000001201301011000I
000001201301011900O
000002201301011900I
000002201301011900O

Emp_No- 000001
Year-2013
Month-01
Date-01
time-10000
In/Out-I

Note Intime means I
Outtime Means O

Oracle Design Structure as follows;

Emp_No Year Month Date time In/Out

In run mode screen as follows;
Browse Button and submit button.

when i click the Browse Button read the .dat file from the system and i have one button called submit.when i click the submit button that read the .dat file and save it into the oracle data base.


Design in Asp.net and back end Oracle11g

Oracle Data base output as follows;


Emp_No Year Month Date time In/Out (from read .dat file)

000001 2013 01 01 10000 I



Thanks and regards,
Magesh.

推荐答案

使用 StreamReader [ ^ ]将文件的每一行读入一个字符串对象,然后使用各种字符串方法将其拆分为数据库记录的单独字段。
Use a StreamReader[^] to read each line of the file into a string object, and then use the various string methods to split it into the separate fields of your database record.






看看这里:

http://msdn.microsoft.com/en-us/library/vstudio/ezwyzy7b.aspx [ ^ ]

http:// msdn .microsoft.com / zh-cn / library / db5x7c0d.aspx [ ^ ]

http:// www。 csharp-station.com/HowTo/ReadWriteTextFile.aspx [ ^ ]

http://www.csharp-examples。 net / filestream-read-file / [ ^ ]

http://csharp.net- tutorials.com/file-handling/reading-and-writing/ [ ^ ]
Hi,

Have a look here:
http://msdn.microsoft.com/en-us/library/vstudio/ezwyzy7b.aspx[^]
http://msdn.microsoft.com/en-us/library/db5x7c0d.aspx[^]
http://www.csharp-station.com/HowTo/ReadWriteTextFile.aspx[^]
http://www.csharp-examples.net/filestream-read-file/[^]
http://csharp.net-tutorials.com/file-handling/reading-and-writing/[^]


这篇关于如何读取dat文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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