473,804 Members | 3,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

write in text file thru vb 6.0

11 New Member
hi
my requirement is read the data from the text file through vb. then calculate the data and write the result on the same text file where the data has retrived thru vb 6.0. how 2 implement the namespace in vb 6.0

i had read the text file by using

Dim sfil As String
Dim dd
Dim schunk As String
Dim nSourceFile As Integer, sText As String
sfil = "E:\proposed.tx t"
nSourceFile = FreeFile

Open sfil For Input As #nSourceFile
Do While Not EOF(1)
Line Input #1, schunk


then i had done the calculation . now i want 2 write the result in the same text file.

can anyone help me regarding this issue.

regards
vivek
Nov 2 '06
11 22550
Killer42
8,435 Recognized Expert Expert
I guess there is no problem to store a few hundred kilobytes of text in a string variable then. Problem solved. :)
Not unless you're using a really old computer, I'd say.

I realize now that I wrote concatenated, when I really ment truncated. :\ Bet it makes more sense now.
Ah, concatenated, truncated, same thing. :)

Got to watch those little details in programming, or they'll bite you.

Anyway, Im glad you people took time to look at my problems. Great forum.
It's been fun. So, you've got it sorted now?
Nov 16 '06 #11
softinco
1 New Member
Hello Mr. vivek

firs close the text file and as you had opened the text file for input. now open the text file as output and use print command to print the lines to text file.

In case of prob pl write back i will send u my code of generating the text file.

Can u help me in other case which i facing the prob.

I want to print the existing text file to printer ( either local or network) thru VB coding. User has to input the file name or i can make different options for different files in VB menu option.

Thanks



hi
my requirement is read the data from the text file through vb. then calculate the data and write the result on the same text file where the data has retrived thru vb 6.0. how 2 implement the namespace in vb 6.0

i had read the text file by using

Dim sfil As String
Dim dd
Dim schunk As String
Dim nSourceFile As Integer, sText As String
sfil = "E:\proposed.tx t"
nSourceFile = FreeFile

Open sfil For Input As #nSourceFile
Do While Not EOF(1)
Line Input #1, schunk


then i had done the calculation . now i want 2 write the result in the same text file.

can anyone help me regarding this issue.

regards
vivek
Sep 11 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1907
by: Xah Lee | last post by:
20050207 text pattern matching # -*- coding: utf-8 -*- # Python # suppose you want to replace all strings of the form # <img src="some.gif" width="30" height="20"> # to # <img src="some.png" width="30" height="20"> # in your html files.
3
6361
by: Abhishek | last post by:
Hi! Everyone I have a small issue, if anyone could help me out I need to upload user files to my website thru my web application. something similar to attaching a file to the mail. I know one way of doing it is thru HTTP but that gives a limitation of 4mb I was doing it thru FTP and it worked fine during preliminary testing on the localhost. but when i tried it doing thru intranet it gave me a problem,
11
3764
by: MPF | last post by:
Alas, I surrender... In a file from a COBOL dump, which is in ASCII, one of the fields is defined as S9(9) V99 Value +0. The value in this location is 0000018922D, which according to the author of the source, translates to 00000189224. How can this be translated via .Net? I've tried StreamReader and trying to convert everything to bytes, but I end up with the same value (0000018922D).
0
1675
by: Dave S | last post by:
I have a lot of forms on our web site that require the user to fill out information and submit it back to us. currently the information comes back as name value pair. The our employee's then has to go thru all this code and fill in a template with the data and print the info out. It would be so much easier if we could have a button that would access the file/send/page by email button on IE. Using asp.net 2 the my.computer.keyboard.sendkey...
11
16306
by: Edson Peacock | last post by:
I have a report with sub reports, one of the subreports have 12 text boxes that are 2" high and I want them all to grow if one goes to 3" high. If anyone has any suggestions they are very much appreciated. Thanks
1
1341
by: asdfghjkl2007 | last post by:
Hy Is it possible to write a html script that acts as a server ? someting like: - it should start when a client opens the web page on witch it is housted - receve a stream o bits from the client ( from witch it will extract the necessary commands) - open another stream to the same client thru witch it should send a part of a file that is stored in the same directory as the web page - open another conection to the same...
1
8067
by: =?Utf-8?B?R2FuZXNoIE11dGh1dmVsdQ==?= | last post by:
Hello All, Our application write logs to a file in a folder. Before our application starts writing to that file, I want to check if the current user has write access to that file, for example, "c:\temp\LogFile.txt". I see several articles for setting file access permissions, getting file access permissions for a given user or current user - but the current user could also gain write access to the same file not just by explicit permssion...
12
2094
by: shantanu | last post by:
Hi i am trying to upload a txt file thru this code, but its not updating the data. is this code fine. Or can anybody please suggest me some other meathod to do the same. its urgent please help regards shantanu WebClient client = new WebClient();
7
1468
by: Ira.Kovac | last post by:
Hello All, I'd greatly appreciate if you can take a look at the task I need help with. It'd be outstanding if someone can provide some sample Python code. Thanks a lot, Ira
0
9711
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9591
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10331
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.