Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Data entry in sequential file in vb6

Data entry in sequential file in vb6

Scheduled Pinned Locked Moved Visual Basic
help
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Preeti1979
    wrote on last edited by
    #1

    I have a FlexGrid control in which i make data entry and when i click on save command button it saves that data to a sequential file. Now my problem is that in another form, I want the user to edit any cell in the FlexGrid and that entry must replace the corresponding entry in the sequential file. But it is appending in the file, inspite of replacing the value that is edited.

    D 1 Reply Last reply
    0
    • P Preeti1979

      I have a FlexGrid control in which i make data entry and when i click on save command button it saves that data to a sequential file. Now my problem is that in another form, I want the user to edit any cell in the FlexGrid and that entry must replace the corresponding entry in the sequential file. But it is appending in the file, inspite of replacing the value that is edited.

      D Offline
      D Offline
      den2k88
      wrote on last edited by
      #2

      Sequential files are tricky: they are called sequential because you cannot change the contents in an aribitrary location in the file. The only solution using sequential files is to 1) create a new temporary file (in Output so you don't accidentally append to an existing file) 2) append the old data into the new file until you reach the point which the changed data 3) write the new data 4) resume appending the remaining data (take care to skip the changed ones before resuming copy) The other solution requires you to use Random Access Files and to devise another way of memorizing the data.

      Geek code v 3.12 GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- r++>+++ y+++* Weapons extension: ma- k++ F+2 X

      P 1 Reply Last reply
      0
      • D den2k88

        Sequential files are tricky: they are called sequential because you cannot change the contents in an aribitrary location in the file. The only solution using sequential files is to 1) create a new temporary file (in Output so you don't accidentally append to an existing file) 2) append the old data into the new file until you reach the point which the changed data 3) write the new data 4) resume appending the remaining data (take care to skip the changed ones before resuming copy) The other solution requires you to use Random Access Files and to devise another way of memorizing the data.

        Geek code v 3.12 GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- r++>+++ y+++* Weapons extension: ma- k++ F+2 X

        P Offline
        P Offline
        Preeti1979
        wrote on last edited by
        #3

        Thanks for the help...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups