VB Help

  bctighe 15:32 02 Jun 03
Locked

I was wondering if any could help me figure out how to update a .dat file at a specific point within the file, eg at line 3 character 64.

I know how to use LOF and Print #1, Tab() etc, but I can't get it to appear at then end of the line I want to update, the new text always appears at the bottom of the file. The file is being opened for append, I have tried to open as Binary but keep getting a Bad File Mode error whenever it is accessed.

  recap 19:11 02 Jun 03

refresh

  VoG™ 22:37 02 Jun 03

Sorry I don't speak VB but I'm sure there is a simple answer. If you are opening the file as "Append" your changes are bound to be applied to the end of the file. Is there an option to open the file as "Write" or "Read/Write" in VB (what version)?

  Taran 01:37 03 Jun 03

Which version of VB are you using and which version was it written in ?

Are you the originating author or are you amending someone elses work ?

Were the DAT file(s) added to Visual Source Safe ?

There are a great many more questions I could ask, but depending on how the program has been written and compiled and its dependant files, you could have the devils own job ahead of you.

Not using Visual Source Safe alone means you have to manually code your checkin and checkout and all kinds of other fun things. Nightmare.

Try and supply as much detail as you can. I'm not online as much as normal at the moment due to a very hectic schedule, but someone will help I'm sure.

Regards

Taran

  bctighe 08:47 03 Jun 03

using the append method, but I was sat thinking about it, and realised that the seek command should hopefully resolve the issue, in response to Tarans comments, I am the originating author, and the dat file is in essence a text file with a different file extension, I'm using VB6 sp 5.

Thanks for the tips. I'll let you know if it works.

This thread is now locked and can not be replied to.

Surface Pro (2017) vs Surface Pro 4

20 groundbreaking 3D animation techniques

How to mine Bitcoin on Mac