• Want to save value in the variables even after the application is closed in visual basic 6.0

    Home » Forums » Developers, developers, developers » DevOps Lounge » Want to save value in the variables even after the application is closed in visual basic 6.0

    Author
    Topic
    #505672

    I am making a login page form for a project of mine and there is also a registration form in it so what basically I want to do is to store the different usernames and password stored by different people from registration form and use those to login I made a module but the information stored in an array in the module is temporary so is there a way to store the registration information into the rom permanently???

    Viewing 1 reply thread
    Author
    Replies
    • #1564958

      Polar,

      Welcome to the Lounge as a new poster. :cheers:

      First you can’t store to ROM as that is Read Only Memory.

      What you’ll need to do is to write all the information you want to preserve to a file. Since it is to be used later to verify logons, as I read your post, you’ll need to store that file in a location, e.g. network drive, cloud drive, etc., that all your users will have access to.

      You’ll also have to make your VB routine read that file first thing when it is started. Also once read you will want to close it so if another user needs to write to it it will be available, e.g. only keep it open the minimum time necessary to complete an operation Read/Write.

      HTH :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #1564969

        Polar,

        Welcome to the Lounge as a new poster. :cheers:

        First you can’t store to ROM as that is Read Only Memory.

        What you’ll need to do is to write all the information you want to preserve to a file. Since it is to be used later to verify logons, as I read your post, you’ll need to store that file in a location, e.g. network drive, cloud drive, etc., that all your users will have access to.

        You’ll also have to make your VB routine read that file first thing when it is started. Also once read you will want to close it so if another user needs to write to it it will be available, e.g. only keep it open the minimum time necessary to complete an operation Read/Write.

        HTH :cheers:

        thank you :rolleyes:

        Then can you guide me of what kind of file should I be making?? like should it be a notepad file and if it is to be a notepad file then how do I store the value of the array in the notepad file I am very new so sorry for my little knowledge.

    • #1564974

      Polar,

      Sorry but I can’t offer further advice as I’m not a VB programmer nor do I have the tools to investigate the posibilities. I was answering the question from my general background in programming with other languages.

      My recommendation would be a database file of some kind. You should have a look at the dll references available in VB (I’m pretty sure there are ones for Access and/or SQL Databases or possibly Excel) with them you could create and populate a database/list w/o actually having Access and/or Excel.

      Perhaps some Lounge members with VB experience will chime in.

      BTW: Since this is about Visual Basic and NOT Visual Basic for Applications I’m moving the thread to Windows Programming.

      :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    Viewing 1 reply thread
    Reply To: Want to save value in the variables even after the application is closed in visual basic 6.0

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: