FW_DbfSqlQuery

FW_DbfSqlQuery

Postby damianodec » Wed Mar 04, 2020 2:15 pm

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?
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: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: FW_DbfSqlQuery

Postby damianodec » Wed Mar 04, 2020 3:08 pm

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
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: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: FW_DbfSqlQuery

Postby nageswaragunupudi » Wed Mar 04, 2020 7: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
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FW_DbfSqlQuery

Postby damianodec » Thu Mar 05, 2020 7: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 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: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests