FW_DbfSqlQuery

Post Reply
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

FW_DbfSqlQuery

Post by damianodec »

Hi,
In FWH ver 1907
this command:

Code: Select all

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?
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

Re: FW_DbfSqlQuery

Post by damianodec »

function FW_DbfSqlQuery Return...:

Code: Select all

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
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FW_DbfSqlQuery

Post 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
Regards

G. N. Rao.
Hyderabad, India
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

Re: FW_DbfSqlQuery

Post 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.
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Post Reply