473,657 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB6 File Flag

19 New Member
Does anyone know how to reset the file flag in VB6 so that I can make a file that writes rows? For example:

Apples
Oranges
Bananas
Grapes

Then after writing "Grapes", goes back to the top and writes:

Apples 5
Oranges 7
Bananas 3
Grapes 6

Then goes back to the top and does it again.
Nov 17 '06 #1
2 1972
albertw
267 Contributor
Does anyone know how to reset the file flag in VB6 so that I can make a file that writes rows? For example:

Apples
Oranges
Bananas
Grapes

Then after writing "Grapes", goes back to the top and writes:

Apples 5
Oranges 7
Bananas 3
Grapes 6

Then goes back to the top and does it again.
hi

if your file has been written already you can't, exept in case your use a binary random access file. but you need to declare fields.
otherwise you need to open the sourcefile again (for input), read it in e.g a listbox, add numbers behind the selected items and write back.
Nov 17 '06 #2
mmurphmsu
19 New Member
ok, thanks for the info
Nov 17 '06 #3

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

Similar topics

11
3621
by: BoonHead, The Lost Philosopher | last post by:
I think the .NET framework is great! It's nice, clean and logical; in contradiction to the old Microsoft. It only saddens me that the new Microsoft still doesn't under stand there own rules when it comes to file paths. A lot of Microsoft installers for example, and also installers of other companies, do not work because they handle paths in the following manner:
3
2703
by: Abhas | last post by:
> > Hi, this is Abhas, > > I had made a video library program in C++, but was facing a problem. > > After entering 12 movies, i cannot enter any more movies. > > Something gibberish comes instead. > > Can somebody please tell whats wrong?? > > This is the code : : #include<fstream.h> #include<conio.h>
2
7229
by: Pecanfan | last post by:
Hi, I'm trying to come up with a way of generating 'warning' e-mails based on specific criteria within an Access (2003) database. I've decided to do this by exporting specific information to a text file which then gets parsed by a simple shell program and processed by a 3rd party SMTP engine (Blat). With my VERY limited knowledge of VB and Access coding, this is what I've come up with so far:-
3
2293
by: kimimaro | last post by:
hi below is my save function that is used to placed data from the C program to a text file for future usage. void save() { FILE *save; int i = 0; save=fopen("employeerecord.txt", "a+");
17
1985
by: News | last post by:
Hi everyone, My goal is to pull command switches/options from a file and then assign the values to select variables which would eventually be included in a class object. The data file looks something like this but the switches could be in any order and not all may be used. -m quemanager -s server -p port -k key -o object -c 20 -t test@email.com
4
1587
by: amit | last post by:
Hi guys!I am trying to write a program which will segregate some selected keywords from a given file.The source code is given alongwith #include<stdio.h> #include<string.h> char key_set={"ami\0","inc\0","lud\0"}; #define MAX_KW_SIZE 10 #define MAX_OCUR 100
1
8366
by: michael8 | last post by:
The problem was to write a program that reads a .cpp file containing a C++ program and produces a file with all comments stripped from the program. I finally got the answer. Here it is if someone want it as no one could do it : P #include <iostream>
5
64620
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C++ programming. FYI Although I have called this article “How to Parse a File in C++”, we are actually mostly lexing a file which is the breaking down of a stream in to its component parts, disregarding the syntax that stream contains. Parsing is actually including the syntax in order to make...
2
2467
by: gustavoprogrammer | last post by:
Hi you guys! How are? I'm new at the forum and know you could help me!! I Have a C program that works with file...it's so simple, but i need help with deletion of some data in a file(.dat). This data i refer, is something previous recorded in file. Besides, i need to implement a bubble sort algorithm to sort the product code. Most of the code or some words are in portuguese, but i think you may understand that!!! See the following...
13
1815
by: Rajkiran R.B. | last post by:
I have written a program in C#... Now the requirement is that I want an assembly code to be the output rather than the regular executable output.. Can anyone say how to do it..
0
8392
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
8305
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,...
1
8503
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,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
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
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
2
1611
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.