locked
image store in vfp dbf RRS feed

  • Question

  • hi!

      please can someone help me of this problem

    can i save fingerprint image in dbf file and how ( i am using digital persona) if yes  what is the data type and then i want to search data with fingerprint image .  is it possible or not

     

    thanks

    nilkamal

    Thursday, January 10, 2008 3:06 PM

Answers

  •  NILKAMAL wrote:

    but i am trying to call fingerprint scanner software from vfp ant trying to take fp and store path in vfp table , 1) now how do i call other application from vfp

     

    If the other application exposes an automation interface, you can run it using automation. You will have to consult the technical documentation that comes with the product.

    Thursday, January 10, 2008 10:15 PM
  •  NILKAMAL wrote:

    can i save fingerprint image in dbf file and how ( i am using digital persona) if yes  what is the data type and then i want to search data with fingerprint image .  is it possible or not

     

    I would echo Marcia's suggestion that in general it's better to store a link to the image rather than the image itself, but if you need or want to store the image itself then one way to do it is to use a Memo (binary) field. You can experiment with this using code like the following:

     

    Code Block

    CREATE TABLE myImageTable ( cImage M NOCPTRANS)

    APPEND BLANK

    REPLACE cImage WITH FILETOSTR( GETFILE()) && For testing, just select the file.

     

     

    Using NOCPTRANS makes it a binary memo field so there is no character translation between different code pages, which is essential when storing binary data. 

     

    If you want to extract the image you can create a temporary file from the memo field like this:

     

    Code Block
    STRTOFILE( cImage, "myImage.jpg", 0)  && Use whatever file extension you need.

     

     

    Then you can do whatever you need to with the file, for example use ShellExecute to open the file in the registered application for that file type on the user's machine.

     

    -RIck

     

    Sunday, January 13, 2008 11:31 PM
  •  NILKAMAL wrote:

    can i save fingerprint image in dbf file and how ( i am using digital persona) if yes  what is the data type and then i want to search data with fingerprint image . 

     

    I would advise you against storing images in a dbf. A better idea is to leave the image files in their own separate folder and same the name of the image file in a field in the dbf. Then you can use the name of the file to access it.

    Thursday, January 10, 2008 3:29 PM

All replies

  •  NILKAMAL wrote:

    can i save fingerprint image in dbf file and how ( i am using digital persona) if yes  what is the data type and then i want to search data with fingerprint image . 

     

    I would advise you against storing images in a dbf. A better idea is to leave the image files in their own separate folder and same the name of the image file in a field in the dbf. Then you can use the name of the file to access it.

    Thursday, January 10, 2008 3:29 PM
  • thanks for your reply

     but i am trying to call fingerprint scanner software from vfp ant trying to take fp and store path in vfp table , 1) now how do i call other application from vfp

     

    Thursday, January 10, 2008 8:08 PM
  •  NILKAMAL wrote:

    but i am trying to call fingerprint scanner software from vfp ant trying to take fp and store path in vfp table , 1) now how do i call other application from vfp

     

    If the other application exposes an automation interface, you can run it using automation. You will have to consult the technical documentation that comes with the product.

    Thursday, January 10, 2008 10:15 PM
  •  NILKAMAL wrote:

    can i save fingerprint image in dbf file and how ( i am using digital persona) if yes  what is the data type and then i want to search data with fingerprint image .  is it possible or not

     

    I would echo Marcia's suggestion that in general it's better to store a link to the image rather than the image itself, but if you need or want to store the image itself then one way to do it is to use a Memo (binary) field. You can experiment with this using code like the following:

     

    Code Block

    CREATE TABLE myImageTable ( cImage M NOCPTRANS)

    APPEND BLANK

    REPLACE cImage WITH FILETOSTR( GETFILE()) && For testing, just select the file.

     

     

    Using NOCPTRANS makes it a binary memo field so there is no character translation between different code pages, which is essential when storing binary data. 

     

    If you want to extract the image you can create a temporary file from the memo field like this:

     

    Code Block
    STRTOFILE( cImage, "myImage.jpg", 0)  && Use whatever file extension you need.

     

     

    Then you can do whatever you need to with the file, for example use ShellExecute to open the file in the registered application for that file type on the user's machine.

     

    -RIck

     

    Sunday, January 13, 2008 11:31 PM
  •  NILKAMAL wrote:

    ...and then i want to search data with fingerprint image .  is it possible or not

     

    Not sure what kind of search you would be doing on an image file, but in any case you cannot search binary data in any meaningful way. If you are storing links you could search for a file name. On the other hand, if you have external software that can do some kind of search or comparison on a fingerprint image then you could theoretically pass the image from VFP to that software as a temporary file.

     

    -Rick

    Sunday, January 13, 2008 11:40 PM