通过在vc ++ 6中从访问数据库中重新读取(读取)文本文件来写入数据。

问题描述:

您好,



我在vc ++ 6.0中实现了一个打印模块。我想为已经在vc ++ 6.0中实现的软件生成的测试报告创建Headers现在在我的打印模块中我必须实现一个对话框,我在其中输入了应该在标题中的所有信息(如company_name,address,website,model,Orderno) 。并将其保存到访问数据库中。

我的问题是在将所有信息保存到数据库之后,现在如何读取此信息并在vc ++中写入文本文件?我是vc ++的新手。



只是告诉我如何在文件中的单个编辑框数据中写入文本。用于显示此数据作为打印预览。



谢谢。

Hello,

I am implementing one print module in vc++ 6.0. I want to create Headers for test report generated by software already implemented in vc++ 6.0 Now in my print module I have to implement one dialogbox on which I entered all information which should be in header (Like company_name,address,website,model,Orderno). and save it into access database.
My question is after saving this all information in database, Now how to read this information and write on text file in vc++? I am new in vc++.

just guid me for how to write text in single editbox data on file. for show this data as a print preview.

Thank you.

因为您使用MFC您可以使用Microsoft的 CFile类。注意检查每个函数调用是否有错误。使用一些跟踪或日志记录功能来检测错误。



您的代码看起来应该像Microsoft 示例代码
Because you work with the MFC you can use the CFile class from Microsoft. Take care to check EVERY function call for errors. Use some trace or logging function to detect errors.

Your code should look like the Microsoft example code.