::oDBF:SetOrder( 2 )
llSuccess := ::oDBF:Seek( ::sSearch )
ASIZE( ::aKey, 0 )
ASIZE( ::aFName, 0 )
ASIZE( ::aGName, 0 )
ASIZE( ::aGender, 0 )
ASIZE( ::aDOB, 0 )
DO WHILE llSuccess
::nFound += 1
AADD( ::aKey, PT_KEY )
AADD( ::aFName, PT_NMFAMLY )
AADD( ::aGName, PT_NMGIVEN )
AADD( ::aGender, PT_GENDER )
AADD( ::aDOB, DTOC( STOD( PT_DOB ) ) ))
::oDBF:Skip( 1 )
IF ::oDBF:EOF()
llSuccess := .F.
ELSE
lcTest := UPPER( PT_NMFAMLY + PT_NMGIVEN )
IF lcTest <> ::sSearch
llSuccess := .F.
ENDIF
ENDIF
ENDDO
oQuery := SQL_QUERY():New()
sQueryString :='SELECT PT_KEY AS sKey, PT_NMFAMLY AS sNmFamly, PT_NMGIVEN AS sNmGiven, PT_DOB as sDOB, PT_GENDER AS cGender FROM PT_PATIENT WHERE PT_NMFAMLY EQUALS "' + ::sSearch + '"'
oQuery:sSelect := sQueryString
llSuccess := oQuery:Execute()
::oDBF:SetOrder( 2 )
llSuccess := ::oDBF:Seek( ::sSearch )
ASIZE( ::aRESULTS[1], 0 )
ASIZE( ::aRESULTS[2], 0 )
ASIZE( ::aRESULTS[3], 0 )
ASIZE( ::aRESULTS[4], 0 )
ASIZE( ::aRESULTS[5], 0 )
DO WHILE llSuccess
::nFound += 1
AADD( ::aRESULTS[1], PT_KEY )
AADD( ::aRESULTS[2], PT_NMFAMLY )
AADD( ::aRESULTS[3], PT_NMGIVEN )
AADD( ::aRESULTS[4], PT_GENDER )
AADD( ::aRESULTS[5], DTOC( STOD( PT_DOB ) ) ))
::oDBF:Skip( 1 )
IF ::oDBF:EOF()
llSuccess := .F.
ELSE
lcTest := UPPER( PT_NMFAMLY + PT_NMGIVEN )
IF lcTest <> ::sSearch
llSuccess := .F.
ENDIF
ENDIF
ENDDO
Rick Lipkin wrote:...connect without any client side drivers and NO odbc .. ADO uses the native 'sqloledb' Win32 built into every Windows operating system from Win98 through Vista SP1 ..
Rick Lipkin
Rick Lipkin wrote:Hua
Since Microsoft makes Sql Server .. it stands to reason they would build into their pc operating systems a native way to connect .. and they do !! .. 'sqloledb' .. and there is NO need for odbc .. no client needed at all !!
However, you will need a client for dB2, Oracle or any other sql database ..
Rick
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 43 guests