FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FW_DbfSqlQuery
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
FW_DbfSqlQuery
Posted: Wed Mar 04, 2020 02:15 PM
Hi,
In FWH ver 1907
this command:
Code (fw): Select all Collapse
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 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Re: FW_DbfSqlQuery
Posted: Wed Mar 04, 2020 03:08 PM
function FW_DbfSqlQuery Return...:
Code (fw): Select all Collapse
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 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FW_DbfSqlQuery
Posted: Wed Mar 04, 2020 07:24 PM

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
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Re: FW_DbfSqlQuery
Posted: Thu Mar 05, 2020 07:18 AM

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 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)

Continue the discussion