dcsimg
Results 1 to 4 of 4

Thread: Storing Images alongside ID

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2017
    Posts
    21

    Storing Images alongside ID

    Hi !

    I am using text files to store my userID's as I am only allowed to do it this way as part of our high school assignment. However I would also like to store images alongside each ID. How can I do this I am struggling with this any ideas ?

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    31,944

    Re: Storing Images alongside ID

    Put them in to a sub folder "photos" and rename them with the ID (assuming the ID is a valid filename format).


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2017
    Posts
    21

    Re: Storing Images alongside ID

    How would i match the ID with the image though, still confused

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    40,346

    Re: Storing Images alongside ID

    It's hard to give accurate advice without knowing the kind of data you have, but assuming that your data includes an ID number like 37, save the picture file with a name of 37 (eg: 37.jpg)

    To load the picture you can detect which file(s) in the folder have the same name (using
    Directory.GetFiles or similar), and assuming there is just one then display it (if there is more than one then it is debatable).
    Last edited by si_the_geek; Dec 15th, 2017 at 02:24 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width