Page 1 of 1

FW_DbfSqlQuery

PostPosted: Wed Mar 04, 2020 2:15 pm
by damianodec
Hi,
In FWH ver 1907
this command:
Code: Select all  Expand view

local cCode := 'C1234,11''

FW_DbfSqlQuery( "c:\Archivi\", "SELECT COUNT(*) FROM ( SELECT CODART FROM ORDINI WHERE CODART = '
"+cCode+"')" )


returns value COUNT of cCode in ORDINI.DBF

the same command with FWH 1906 returns Nil value...

why?

Re: FW_DbfSqlQuery

PostPosted: Wed Mar 04, 2020 3:08 pm
by damianodec
function FW_DbfSqlQuery Return...:
Code: Select all  Expand view
function FW_DbfSqlQuery( cFullPath, cSql, lExecute, lAsRecSet, lCompact )

   local uRet
   local cAlias, cTable := "", cFolder, nAt
   local oCn, oRs

   if cFullPath == nil
      if !Empty( cAlias := Alias() )
         cFullPath      := DBINFO( DBI_FULLPATH )
      endif
   endif
   if Empty( cFullPath )
      cFullPath   := ".\"
   endif
   
   cFullPath      := TrueName( cFullPath )

   cFolder        := cFilePath( cFullPath )
   if Right( cFullPath, 1 ) != ''
      cTable      := cFileNoExt( cFullPath )
   endif

   oCn := FW_OpenAdoConnection( cFolder )

   if oCn == nil
      return nil    <============== WITH 19.06 EXIT HERE
   endif

Re: FW_DbfSqlQuery

PostPosted: Wed Mar 04, 2020 7:24 pm
by nageswaragunupudi
FW_DbfSqlQuery() works exactly the same way with both FWH1709 and FWH1906.

You are facing the problem because you are trying with 64-bit application.

This function uses
1) Microsoft.ACE.OLEDB.12.0 provider, if installed and if not
2) Microsoft Jet OLEDB provider.

Jet OLEDB provider is automatically installed by Windows on every PC, but this is a 32-bit provider and does not work with 64-bit applications.

If you want to use this function with 64-bit application, you have to download and install the 64-bit version of ACE.OLEDB.12.0 provider. You can do this by downloading and installing 64-bit version of "Microsoft Access Database Engine 2010 Redistributable". Please make sure you are installing the 64-bit version only.

Please go to this site:
https://www.microsoft.com/en-in/downloa ... x?id=13255

Re: FW_DbfSqlQuery

PostPosted: Thu Mar 05, 2020 7:18 am
by damianodec
thank you Mr. Rao.
but does 64bit have other problems?
Can I to use 64bit or have I return to 32bit?
thank you.