使用.dat文件 [英] Working with .dat files

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

问题描述

好的,我对此完全陌生。我唯一知道的是如何通过打开文件来存储某个文件,然后使用put然后关闭它。


我将多个记录存储在一个文件中。每条记录大约有6个字段。我还希望能够将特定记录中的个别字段显示到单个文本框中,如何进行此操作?


例如客户ID,客户名称,地址,电话号码等存储在dat文件中,使用put #filenumber,customerID等。

我现在想在textboxes,txtCustomerID,txtCustomerName等中显示这些信息。


谢谢。

解决方案

简单 - 只需使用获取,方法与 Put 相同。

试试这个示例代码。

展开 | 选择 | Wrap | 行号


我建​​议明确告诉 VB你想要什么,而不是依赖于默认值。换句话说......

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号


Okay, I''m totally new to this. The only thing I know is how to store something in a dat file by opening a file, using put then closing it.

I''m storing multiple records in a file. Each record has about 6 fields. I also want to be able to display idividual fields in a particular record into individual textboxes, how do I go about doing this?

eg Customer ID, Customer Name, Address, Phone Number etc stored in a dat file, using put #filenumber, , customerID etc.
I now want to display this information in textboxes, txtCustomerID, txtCustomerName etc.

Thank you.

解决方案

Simple - just use Get the same way you did the Put.


Try this sample code.

Expand|Select|Wrap|Line Numbers


I''d recommend explicitly telling VB what you want, rather than relying on defaults. In other words...

Expand|Select|Wrap|Line Numbers


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

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