fingerprint sample uploaded

Post Reply
FGamboa
Posts: 25
Joined: Wed Apr 12, 2006 1:51 am

fingerprint sample uploaded

Post by FGamboa »

Antonio:

this is the link
http://hyperupload.com/download/01d1f85 ... A.ZIP.html

I hope this can help, Please consider It's not a really reduced sample, but take a look at the aParams Array (line 90) where are shifted and doesn't work as expected.

In the Ocx docs exist a lot af ocx:methods with by Reference parameters, especially:
Extract( byRef rawImage as Variant, ...)
and I haven't a known way to call a Method with byReference parameters

uRet = ActXInvoke( ActXPdisp( ::hActiveX ), cMethodName, uParam1,... )

Doesn't do the job for me at this moment.

I will thank any answer.
Regards
Fco Gamboa
fleal
Posts: 234
Joined: Tue Oct 25, 2005 12:39 am
Location: México, DF

Re: fingerprint sample uploaded

Post by fleal »

Francisco

¿Qué lector tienes?

Saludos
Fernando
FGamboa
Posts: 25
Joined: Wed Apr 12, 2006 1:51 am

Post by FGamboa »

Hola Fernando:

Tengo Digital Persona U.areU.400B Reader

Gracias por tu atención y Saludos

Fco Gamboa
fleal
Posts: 234
Joined: Tue Oct 25, 2005 12:39 am
Location: México, DF

Contactame.

Post by fleal »

Francisco,
dame de alta en el messanger o envíame un mail a.

visitante32@hotmail.com

Gracias
Fernando Leal
México, DF
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

it is compatible with microsoft fingerprint reader ?
Best Regards, Saludos

Falconi Silvio
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

Hi fGamboa

You can't use oActiveX:bOnEvent if used CreateOleObject(). This features return a handle and not a object.

If use oActiveX = TActiveX():New( oWnd, "GrFingerX.GrFingerXCtrl.1") the result is better.

I post this code below to help you in database control:

My ADODB.CH:

Code: Select all

#command ADO APPEND BLANK  => oRs:AddNew()
#command ADO EDIT          => oRs:Edit()
#command ADO COMMIT        => oRs:Update()
#command ADO SKIP          => oRs:Move( oRs:AbsolutePosition )
#command ADO REGLOCK       => dbNetRegLock( 0 )    ; dbCommitLog('M', PROCNAME())
#command ADO DELETE        => oRs:Delete()
#command ADO REPLACE <f1> WITH <v1> => oRs:Fields( <(f1)> ):Value := <v1>
#command ADO GOTOP         => oRs:MoveFirst()
#command ADO GOBOTTOM      => oRs:MoveLast()    
#command ADORECNO()        => oRs:AbsolutePosition 
#command ADOFILE(<tB>)     => iif(oRs:Table(<tB>)==<tB>,.t.,.f.)
#command ADO USE           => oRs:Close()    
#command ADO CLOSE         => oRs:Close()    
#command ADO SAVE <CfILE>  => oRs:Save( <CfILE>, adPersistXML )
#command ADO EXECUTE <Sql> => oRs:Open( <Sql>, StrConnection, 1, 3 )
#command ADO CONNECT ON <StrServer>                               ;
                    [PORT <StrPort>]                                    ;
                    [DATABASE <StrDatabase>]                            ;
                    [USER <StrUserID>]                                  ;
                    [PASSWORD <StrUserPWD>]                             ;
                    [OPTIONS <nFlags>]                                  ;
                     DRIVER <StrDriver>                              => ;
                      StrConnection := "driver={"+<StrDriver>+"};database="+<StrDatabase>+";server="+<StrServer>+";uid="+<StrUserID>+";pwd="+<StrUserPWD>+";option=35" ;
                    ; oRs := TOleAuto():New( "ADODB.Recordset" )      ;
                    ; oRS:CursorType     := adOpenStatic      ;
                    ; oRS:CursorLocation := adUseClient       ;
                    ; oRS:LockType       := adLockPessimistic 

/*---- CursorTypeEnum Values ----*/
#define adOpenForwardOnly 0
#define adOpenKeyset 1
#define adOpenDynamic 2
#define adOpenStatic 3

/*---- LockTypeEnum Values ----*/
#define adLockReadOnly 1
#define adLockPessimistic 2
#define adLockOptimistic 3
#define adLockBatchOptimistic 4

/*---- CursorLocationEnum Values ----*/
#define adUseServer 2
#define adUseClient 3

/*---- DataTypeEnum Values ----*/
#define adEmpty 0
#define adTinyInt 16
#define adSmallInt 2
#define adInteger 3
#define adBigInt 20
#define adUnsignedTinyInt 17
#define adUnsignedSmallInt 18
#define adUnsignedInt 19
#define adUnsignedBigInt 21
#define adSingle 4
#define adDouble 5
#define adCurrency 6
#define adDecimal 14
#define adNumeric 131
#define adBoolean 11
#define adError 10
#define adUserDefined 132
#define adVariant 12
#define adIDispatch 9
#define adIUnknown 13
#define adGUID 72
#define adDate 7
#define adDBDate 133
#define adDBTime 134
#define adDBTimeStamp 135
#define adBSTR 8
#define adChar 129
#define adVarChar 200
#define adLongVarChar 201
#define adWChar 130
#define adVarWChar 202
#define adLongVarWChar 203
#define adBinary 128
#define adVarBinary 204
#define adLongVarBinary 205
#define adChapter 136
#define adFileTime 64
#define adPropVariant 138
#define adVarNumeric 139
#define adArray &H2000

/*---- GetRowsOptionEnum Values ----*/
#define adGetRowsRest -1

/*---- PositionEnum Values ----*/
#define adPosUnknown -1
#define adPosBOF -2
#define adPosEOF -3

/*---- BookmarkEnum Values ----*/
#define adBookmarkCurrent 0
#define adBookmarkFirst 1
#define adBookmarkLast 2

/*---- MarshalOptionsEnum Values ----*/
#define adMarshalAll 0
#define adMarshalModifiedOnly 1

/*---- AffectEnum Values ----*/
#define adAffectCurrent 1
#define adAffectGroup 2
#define adAffectAllChapters 4

/*---- ResyncEnum Values ----*/
#define adResyncUnderlyingValues 1
#define adResyncAllValues 2

/*---- CompareEnum Values ----*/
#define adCompareLessThan 0
#define adCompareEqual 1
#define adCompareGreaterThan 2
#define adCompareNotEqual 3
#define adCompareNotComparable 4

/*---- FilterGroupEnum Values ----*/
#define adFilterNone 0
#define adFilterPendingRecords 1
#define adFilterAffectedRecords 2
#define adFilterFetchedRecords 3
#define adFilterConflictingRecords 5

/*---- SearchDirectionEnum Values ----*/
#define adSearchForward 1
#define adSearchBackward -1

/*---- PersistFormatEnum Values ----*/
#define adPersistADTG 0
#define adPersistXML 1

/*---- StringFormatEnum Values ----*/
#define adClipString 2

/*---- ConnectPromptEnum Values ----*/
#define adPromptAlways 1
#define adPromptComplete 2
#define adPromptCompleteRequired 3
#define adPromptNever 4

/*---- ConnectModeEnum Values ----*/
#define adModeUnknown 0
#define adModeRead 1
#define adModeWrite 2
#define adModeReadWrite 3
#define adModeShareDenyRead 4
#define adModeShareDenyWrite 8

/*---- EventReasonEnum Values ----*/
#define adRsnAddNew 1
#define adRsnDelete 2
#define adRsnUpdate 3
#define adRsnUndoUpdate 4
#define adRsnUndoAddNew 5
#define adRsnUndoDelete 6
#define adRsnRequery 7
#define adRsnResynch 8
#define adRsnClose 9
#define adRsnMove 10
#define adRsnFirstChange 11
#define adRsnMoveFirst 12
#define adRsnMoveNext 13
#define adRsnMovePrevious 14
#define adRsnMoveLast 15

/*---- SchemaEnum Values ----*/
#define adSchemaProviderSpecific -1
#define adSchemaAsserts 0
#define adSchemaCatalogs 1
#define adSchemaCharacterSets 2
#define adSchemaCollations 3
#define adSchemaColumns 4
#define adSchemaCheckConstraints 5
#define adSchemaConstraintColumnUsage 6
#define adSchemaConstraintTableUsage 7
#define adSchemaKeyColumnUsage 8
#define adSchemaReferentialConstraints 9
#define adSchemaTableConstraints 10
#define adSchemaColumnsDomainUsage 11
#define adSchemaIndexes 12
#define adSchemaColumnPrivileges 13
#define adSchemaTablePrivileges 14
#define adSchemaUsagePrivileges 15
#define adSchemaProcedures 16
#define adSchemaSchemata 17
#define adSchemaSQLLanguages 18
#define adSchemaStatistics 19
#define adSchemaTables 20
#define adSchemaTranslations 21
#define adSchemaProviderTypes 22
#define adSchemaViews 23
#define adSchemaViewColumnUsage 24
#define adSchemaViewTableUsage 25
#define adSchemaProcedureParameters 26
#define adSchemaForeignKeys 27
#define adSchemaPrimaryKeys 28
#define adSchemaProcedureColumns 29
#define adSchemaDBInfoKeywords 30
#define adSchemaDBInfoLiterals 31
#define adSchemaCubes 32
#define adSchemaDimensions 33
#define adSchemaHierarchies 34
#define adSchemaLevels 35
#define adSchemaMeasures 36
#define adSchemaProperties 37
#define adSchemaMembers 38
#define adSchemaTrustees 39

/*---- FieldStatusEnum Values ----*/
#define adFieldOK 0
#define adFieldCantConvertValue 2
#define adFieldIsNull 3
#define adFieldTruncated 4
#define adFieldSignMismatch 5
#define adFieldDataOverflow 6
#define adFieldCantCreate 7
#define adFieldUnavailable 8
#define adFieldPermissionDenied 9
#define adFieldIntegrityViolation 10
#define adFieldSchemaViolation 11
#define adFieldBadStatus 12
#define adFieldDefault 13
#define adFieldIgnore 15
#define adFieldDoesNotExist 16
#define adFieldInvalidURL 17
#define adFieldResourceLocked 18
#define adFieldResourceExists 19
#define adFieldCannotComplete 20
#define adFieldVolumeNotFound 21
#define adFieldOutOfSpace 22
#define adFieldCannotDeleteSource 23
#define adFieldReadOnly 24
#define adFieldResourceOutOfScope 25
#define adFieldAlreadyExists 26
#define adFieldPendingInsert &H10000
#define adFieldPendingDelete &H20000
#define adFieldPendingChange &H40000
#define adFieldPendingUnknown &H80000
#define adFieldPendingUnknownDelete &H100000

/*---- SeekEnum Values ----*/
#define adSeekFirstEQ &H1
#define adSeekLastEQ &H2
#define adSeekAfterEQ &H4
#define adSeekAfter &H8
#define adSeekBeforeEQ &H10
#define adSeekBefore &H20

/*---- ADCPROP_UPDATECRITERIA_ENUM Values ----*/
#define adCriteriaKey 0
#define adCriteriaAllCols 1
#define adCriteriaUpdCols 2
#define adCriteriaTimeStamp 3

/*---- ADCPROP_ASYNCTHREADPRIORITY_ENUM Values ----*/
#define adPriorityLowest 1
#define adPriorityBelowNormal 2
#define adPriorityNormal 3
#define adPriorityAboveNormal 4
#define adPriorityHighest 5

/*---- ADCPROP_AUTORECALC_ENUM Values ----*/
#define adRecalcUpFront 0
#define adRecalcAlways 1

/*---- ADCPROP_UPDATERESYNC_ENUM Values ----*/

/*---- ADCPROP_UPDATERESYNC_ENUM Values ----*/

/*---- MoveRecordOptionsEnum Values ----*/
#define adMoveUnspecified -1
#define adMoveOverWrite 1
#define adMoveDontUpdateLinks 2
#define adMoveAllowEmulation 4

/*---- CopyRecordOptionsEnum Values ----*/
#define adCopyUnspecified -1
#define adCopyOverWrite 1
#define adCopyAllowEmulation 4
#define adCopyNonRecursive 2

/*---- StreamTypeEnum Values ----*/
#define adTypeBinary 1
#define adTypeText 2

/*---- LineSeparatorEnum Values ----*/
#define adLF 10
#define adCR 13
#define adCRLF -1

/*---- StreamOpenOptionsEnum Values ----*/
#define adOpenStreamUnspecified -1
#define adOpenStreamAsync 1
#define adOpenStreamFromRecord 4

/*---- StreamWriteEnum Values ----*/
#define adWriteChar 0
#define adWriteLine 1

/*---- SaveOptionsEnum Values ----*/
#define adSaveCreateNotExist 1
#define adSaveCreateOverWrite 2

/*---- FieldEnum Values ----*/
#define adDefaultStream -1
#define adRecordURL -2

/*---- StreamReadEnum Values ----*/
#define adReadAll -1
#define adReadLine -2

/*---- RecordTypeEnum Values ----*/
#define adSimpleRecord 0
#define adCollectionRecord 1
#define adStructDoc 2
My sample database:

Code: Select all

/*
 *
 * Mais informacoes sobre ADO em 
 * http://www.microsoft.com/brasil/technet/Colunas/scriptcenter/resources/officetips/nov05/tips1103.mspx
 *
 */
#include "Fivewin.ch" 
#include "adodb.ch" 

FUNCTION MAIN() 
    PUBLIC oRs

    StrDatabase   := [DBMRDELIVERY]
    StrServer     := [127.0.0.1]
    StrPort       := 3306
    StrUserID     := [root]
    StrUserPWD    := []
    StrDriver     := "MySQL ODBC 3.51 Driver"

    StrTable      := [TBCLIENTE]
    StrField      := [ddd]
    StrField2     := [nome]
    StrWhere      := StrField+[="034"]

    StrSqlCommand := [SELECT * FROM ] + StrTable + [ WHERE ] + StrWhere

    ADO CONNECT ON StrServer ;
                PORT StrPort ;
                DATABASE StrDatabase ;
		USER StrUserID ;
                PASSWORD StrUserPWD ;
                OPTIONS 35 ;
		DRIVER StrDriver

    ADO EXECUTE StrSqlCommand

    ADO GOTOP

    Browse( oRs )

    ADO CLOSE

    RETURN NIL

function WBrowseRecordSet( oRs, cStrField ) 
    LOCAL oDlg, oBrw, nRec 
    DEFINE DIALOG oDlg SIZE 300, 300 
    @ 0, 0 LISTBOX oBrw FIELDS oRs:Fields( "nome" ):Value ; 
           HEADERS "Nome do Cliente" ;
           FIELDSIZES 300 ;
           ON RIGHT CLICK ( nRec := oRs:AbsolutePosition,; 
                            oBrw:Report( "TWBrowse report", .T. ),; 
                            oRs:MoveFirst(),; 
                            oRs:Move( nRec - 1 ) ) 
    oBrw:bLDblClick:= { |nRow,nCol| MsgStop( oRs:Fields( "BAIRRO" ):Value ) }
    oBrw:nHeaderStyle  := 2
    oBrw:nHeaderHeight := 20
    oBrw:nLineHeight   := 15
    oBrw:bLogicLen := { || oRs:RecordCount }
    oBrw:bGoTop    := { || oRs:MoveFirst() } 
    oBrw:bGoBottom := { || oRs:MoveLast() } 
    oBrw:bSkip     := { | nSkip | ADOSkipper( oRs, nSkip ) } 
    oBrw:cAlias    := "ARRAY" 
    ACTIVATE DIALOG oDlg; 
             ON INIT oDlg:SetControl( oBrw ); 
             CENTER 
    RETURN NIL

function browse(oRs, bPrc, bAdc, bAlt, bExc, bImp, bSai)
    LOCAL oDlg, oBrw, nRec 
    LOCAL aData := {}
    LOCAL nFor
    LOCAL oLbx, cItem
    LOCAL btnPrc, btnAdc, btnAlt, btnExc, btnImp, btnsai

    DEFAULT bPrc    := { || RecPrc( oLbx ) },;
            bAdc    := { || RecInc( oLbx ) },;
            bAlt    := { || RecAlt( oLbx ) },;
            bExc    := { || RecExc( oLbx ) },;
            bImp    := { || RecImp( oLbx ) },;
            bSai    := { || oDlg2:End() }

    DEFINE DIALOG oDlg2 From 0,0 To 800,1020 Pixel TITLE " ListBox da Tabela "
    @ 05,15 listbox oBrw Fields oRs:Fields( "nome" ):Value, oRs:Fields( "fone" ):Value;
             headers "Nome","Telefone";
             fieldsizes 250,100   ;
             pixel size 400,300 of odlg2

    //oBrw:bLDblClick:= { |nRow,nCol| MsgStop( oRs:Fields( "apelido" ):Value ) }
    oBrw:nHeaderStyle  := 2
    oBrw:nHeaderHeight := 20
    oBrw:nLineHeight   := 15
    oBrw:bLogicLen := { || oRs:RecordCount }
    oBrw:bGoTop    := { || oRs:MoveFirst() } 
    oBrw:bGoBottom := { || oRs:MoveLast() } 
    oBrw:bSkip     := { | nSkip | ADOSkipper( oRs, nSkip ) } 
    oBrw:cAlias    := "ARRAY" 

    @ 18.7 , 05 button btnprc prompt "&Procurar"  of oDlg2 size 40,12 Action RecPrc(oBrw)
    @ 18.7 , 15 button btnadc prompt "&Adicionar" of oDlg2 size 40,12 Action RecInc(oBrw)
    @ 18.7 , 25 button btnalt prompt "A&lterar"   of oDlg2 size 40,12 Action RecAlt(oBrw)
    @ 18.7 , 35 button btnexc prompt "&Excluir"   of oDlg2 size 40,12 Action RecExc(oBrw)
    @ 18.7 , 45 button btnimp prompt "&Imprimir"  of oDlg2 size 40,12 
    @ 18.7 , 55 button btnsai prompt "&Sair"      of oDlg2 size 40,12 Action oDlg2:End()

    ACTIVATE DIALOG oDlg2 //; 
             //ON INIT oDlg2:SetControl( oBrw ); 
             //CENTER 
    RETURN NIL

function ADOSkipper( oRs, nSkip ) 
    LOCAL nRec := oRs:AbsolutePosition 
    oRs:Move( nSkip ) 
    IF oRs:EOF; oRs:MoveLast(); ENDIF 
    IF oRs:BOF; oRs:MoveFirst(); ENDIF 
    RETURN oRs:AbsolutePosition - nRec

//-----------------------------------------------------------
static function  RecPrc(oLbx)
    Local odlg1
    Local cCodigo:=0
    Local cSair:=" "
    Local sql
    DEFINE DIALOG oDlg1 From 0,0 To 160,250  PIXEL;
           TITLE " Procura na Tabela em Access " 
    DEFINE FONT oFont NAME "FIXEDSYS" SIZE 10, -10    && Use a Nonproportional font
    SET FONT OF oDlg1 TO oFont                         && so characters line up in Says
    @ 02,05 say "Codigo : " OF oDlg1 
    @ 02.2,10 get cCodigo   OF oDlg1 picture "9999" size 20,10 
    @ 02.7 , 10 button "Procurar"  of oDlg1 size 40,12 action (cSair:="*",oDlg1:End())
    ACTIVATE DIALOG oDlg1 centered 
    if cSair="*"
       //locate for (odbf:cAlias)->field_0001 = cCodigo
       criterio = "idpessoa Like '" + cCodigo + "%'"
       //oRs:MoveFirst()
       //oRs:Find criterio, 0, adSearchFoward
       if eof()
          msgAlert("NÆo encontrado !!!")
          go top
       endif
       oLbx:Refresh()
    endif
    return nil

//-----------------------------------------------------------
static function  RecInc(oLbx)
    LOCAL odlg3
    LOCAL cNome     := space(40)
    LOCAL cTelefone := space(14)
    LOCAL cEndereco := space(45)
    LOCAL cSair     := " "
    DEFINE DIALOG oDlg3 From 0,0 To 230,500 PIXEL TITLE " Inclusao na Tabela em Access " 
    DEFINE FONT oFont NAME "FIXEDSYS" SIZE 10, -10    && Use a Nonproportional font
    SET FONT OF oDlg3 TO oFont                         && so characters line up in Says
    @ 02,05 say "Nome_____: " OF oDlg3 
    @ 03,05 say "Telefone_: " OF oDlg3
    @ 04,05 say "Endereco_: " OF oDlg3 
    //go bottom
    //cCodigo := odbf:au_id+1
    @ 02.2,10 get cNome     OF oDlg3 picture "@!" size 150,10
    @ 03.3,10 get cTelefone OF oDlg3 picture "(99)9999-9999" size 100,10   valid !empty(cNome)
    @ 04.4,10 get cEndereco OF oDlg3 picture "@!" size 150,10
    @ 04.7 , 15 button "Salvar"   of oDlg3 size 40,12 action (cSair:="*",oDlg3:End())
    ACTIVATE DIALOG oDlg3 centered 
    if cSair="*"
       ADO APPEND BLANK
       ADO REPLACE nome        WITH cNome
       ADO REPLACE fone        WITH cTelefone
       ADO REPLACE endereco    WITH cEndereco
       ADO COMMIT 
       oLbx:Refresh()
       //oLbx:UpStable()
    endif
    return nil

//-----------------------------------------------------------
static function  RecExc(oLbx)
    if MsgYesNo( "Excluir este Registro ?", "Por Favor, confirme" )
       ADO DELETE
       ADO SKIP
       oLbx:Refresh()
       //oLbx:UpStable()
    endif
    return nil

//-----------------------------------------------------------
static function  RecAlt(oLbx)
    LOCAL odlg3
    LOCAL cNome     := oRs:Fields( "nome" ):Value
    LOCAL cTelefone := oRs:Fields( "fone" ):Value
    LOCAL cEstado   := oRs:Fields( "endereco" ):Value
    LOCAL cSair     := " "
    DEFINE DIALOG oDlg3 From 0,0 To 230,500 PIXEL TITLE " Inclusao na Tabela em Access " 
    DEFINE FONT oFont NAME "FIXEDSYS" SIZE 10, -10    && Use a Nonproportional font
    SET FONT OF oDlg3 TO oFont                         && so characters line up in Says
    @ 02,05 say "Nome_____: " OF oDlg3 
    @ 03,05 say "Telefone_: " OF oDlg3
    @ 04,05 say "Endereco_: " OF oDlg3 
    //go bottom
    //cCodigo := odbf:au_id+1
    @ 02.2,10 get cNome     OF oDlg3 picture "@!" size 150,10
    @ 03.3,10 get cTelefone OF oDlg3 picture "(99)9999-9999" size 100,10   valid !empty(cNome)
    @ 04.4,10 get cEndereco OF oDlg3 picture "@!" size 150,10
    @ 04.7 , 15 button "Salvar"   of oDlg3 size 40,12 action (cSair:="*",oDlg3:End())
    ACTIVATE DIALOG oDlg3 centered 
    if cSair="*"
       ADO APPEND BLANK
       ADO REPLACE nome        WITH cNome
       ADO REPLACE fone        WITH cTelefone
       ADO REPLACE endereco    WITH cEndereco
       ADO COMMIT 
       oLbx:Refresh()
       //oLbx:UpStable()
    endif
    return nil

//-----------------------------------------------------------
static function RecImp( oLbx )
/*
   local oRpt
   local n
   local cAlias := If( oLbx != nil, oLbx:cAlias, Alias() )

   REPORT oRpt TITLE "Report: " + cAlias ;
      HEADER "Date: " + DToC( Date() ) + ", Time: " + Time() ;
      FOOTER "Page: " + Str( oRpt:nPage, 3 ) ;
      PREVIEW

      if Empty( oRpt ) .or. oRpt:oDevice:hDC == 0
         return nil
      endif

      for n = 1 to FCount()
         oRpt:AddColumn( TrColumn():New( { FInfo1( cAlias, n ) },,;
                     { FInfo2( cAlias, n ) },,,,,,,,,, oRpt ) )
      next

   ENDREPORT

   ACTIVATE REPORT oRpt

   GO TOP
*/
return nil

//--------------------------------------------
static function FInfo1( cAlias, n )
return { || ( cAlias )->( FieldName( n ) ) }

//-----------------------------------------------------------
static function FInfo2( cAlias, n )
return { || ( cAlias )->( FieldGet( n ) ) }

Function DbfDbt()
Return Nil
This samples works with MySQL, but you can modify to work with Access.

No i sent in private, i prefer to share this information.

Good work.
Post Reply