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. Random Access File (VB)

Random Access File (VB)

Scheduled Pinned Locked Moved Visual Basic
questionhelplounge
2 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.
  • R Offline
    R Offline
    R Thomas 0
    wrote on last edited by
    #1

    hi, i have a question...If i open up a Random Access file in a vb form...witha file number.. lets say then i need to unload the form and go to another form...and use the same file number.... can i take the file number acquired while opening one form to another??? how can i do it?? OR is it better to open and close file at every form??instead of keeping the file number???isn't that bad..keep opening and closing the same file in every file??? can u tell me which way is better?? tks for help... Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40

    D 1 Reply Last reply
    0
    • R R Thomas 0

      hi, i have a question...If i open up a Random Access file in a vb form...witha file number.. lets say then i need to unload the form and go to another form...and use the same file number.... can i take the file number acquired while opening one form to another??? how can i do it?? OR is it better to open and close file at every form??instead of keeping the file number???isn't that bad..keep opening and closing the same file in every file??? can u tell me which way is better?? tks for help... Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      If your want to pass the file number around, keeping the file open, you can pass it as a global variable in a .vb module or class file. On the downside, what your doing isn't considered proper programming technique because it is no longer a modular design. If your going to be doing file access from multiple modules (or forms), it's best to write up a set of public functions that handles file access for you. Oh yeah, it is NOT a bad thing to be opening and closing the same file all the time... But, of course, it all depends on what your doing... RageInTheMachine9532

      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