...back to menu
...back to Images class
Class: Images-Image Handling
How to Read: Property/Method(Parameter As Type, ...) As ReturnValue
Properties
ImgID() As Long
       Purpose:  Return Image Record ID

ImgID(RecordID As Long)
       Purpose:  Set Image Record ID to update a specific record

ImgMLS() As Long
       Purpose:  Return MLS Number

ImgMLS(MLSNumber As Long)
       Purpose:  Set MLS Number for record update

ImgOrder() As String
       Purpose:  Return Image Order Number

ImgOrder(Order As String)
       Purpose:  Set Image Order Number for record update

ImgHeading() As String
       Purpose:  Return Heading (Grouping Name)

ImgHeading(Heading As String)
       Purpose:  Set Heading (Grouping Name) for record update

ImgCaption() As String
       Purpose:  Return Image Caption

ImgCaption(Caption As String)
       Purpose:  Set Image Caption for record update

ImgLocation() As String
       Purpose:  Return Image Location (Full Path)

ImgLocation(Location As String)
       Purpose:  Set Image Location (Full Path) for record update

ImageIndex() As Integer
       Purpose:  Return current Image Index

ImageCount() As Integer
       Purpose:  Return Image Count after calling GetImagesByMLS()

ImageEnd() As Boolean
       Purpose:  Used with GetImageByContactID() and NextImage()

Methods
GetImagesByMLS(MLSNumber As String) As Boolean
       Purpose:  Search DB for records that contain MLS Number in 'mls_no' field
                        Use ImageByIndex() to retrieve records by Index [ 1 to ImageCount() ]
     Requires:  MLS Number
       Returns:  True - successful; False - error or no records were found

GetImages() As Boolean
       Purpose:  Search DB for Image records
                        Set criteria using the Image properties:
                            ImgID(RecordID As Long)
                              - OR -
                            ImgMLS(MLSNumber As Long)
                            ImgOrder(Order As String)
                            ImgHeading(Heading As String)
                            ImgCaption(Caption As String)
                            ImgLocation(Location As String)
                        Use ImageByIndex() to retrieve records by Index [ 1 to ImageCount() ]
     Requires:  MLS Number
       Returns:  True - successful; False - error or no records were found

NextImage()
       Purpose:  Return data for next image found

ImageByIndex(Index As Integer) As Boolean
       Purpose:  Return Image data for a given Index after calling GetImagesByMLS()
     Requires:  Index - number between 1 and ImageCount()
       Returns:  True - successful; False - error

ImageHasDBRecord(Filename As String) As Boolean
       Purpose:  Search DB for records that contain Filename in 'mls_location' field
     Requires:  Complete Filename (i.e, 980001.jpg)
                        - or - filename and letter designator (i.e, 980001A)
       Returns:  True - successful; False - error or no records were found

UpdateImageDB() As Boolean
       Purpose:  Update DB record for given ID -
                        Set values using the Image properties (ImgMLS, ImgOrder, ...)
                        Use ImgID(0) to Add a record to the DB
                        Use ImgID(ID) to Update a record by ID
       Returns:  True - successful; False - error

RemoveImage(PictureFilePath As String, Filename As String) As Boolean
       Purpose:  Remove Image File from file system and delete record from database
     Requires:  Complete Path; Full Filename (i.e., 980001A.jpg)
       Returns:  True - successful; False - error

DeleteDBRecord(Filename As String) As Boolean
       Purpose:  Delete record from database that contain Filename in 'mls_location' field
     Requires:  Complete Filename (i.e, 980001.jpg)
                        - or - filename and letter designator (i.e, 980001A)
       Returns:  True - successful; False - error

SortImages(PictureFilePath As String, MLSNumber As String, ImageList As String) As Boolean
       Purpose:  Resort images - assume no images are added before processing
                        Path and MLS Number used to get original list from file system
                        which is compared to comma delimited ImageList as array
                        Non-matching index filenames are renamed as temp files, then
                        renamed as sorted filenames
     Requires:  Complete Path; MLS Number; Image List (comma delimited)
       Returns:  True - successful; False - error

ResetImageVars()
       Purpose:  Reset all Image variables

...back to Images class
...back to menu