Hi
I would like to use SQL with a DBF file
any help?
thank you
use DBF file with SQL
- damianodec
- Posts: 372
- Joined: Wed Jun 06, 2007 2:58 pm
- Location: Italia
- Contact:
use DBF file with SQL
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)
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Re: use DBF file with SQL
IF you are using ADS(Advantage Database Server) it's easy:
Code: Select all
SELECT 0
AdsCreateSQLStatement( "tmp", 2 )
AdsPrepareSql( cYourSqlStatment )
IF AdsExecuteSql()
...
ENDIF
- damianodec
- Posts: 372
- Joined: Wed Jun 06, 2007 2:58 pm
- Location: Italia
- Contact:
Re: use DBF file with SQL
hi Vilian,
No, I do not use Ads, it's a simple file.dbf with file.cdx
thank you
No, I do not use Ads, it's a simple file.dbf with file.cdx
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)
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: 1102
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Re: use DBF file with SQL
Do you mean running SQL-commands on a DBF-database?
Regards,
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
- damianodec
- Posts: 372
- Joined: Wed Jun 06, 2007 2:58 pm
- Location: Italia
- Contact:
Re: use DBF file with SQL
hi Marc,
I have my single file ORDINI.DBF with index ORDINI.CDX, I don't want to use Clipper command or function: DbUseArea, DbSetIndex, DbSkip, Dbseek...
I'd like to use for this file a simple SQL command "Select * from ORDINI.DBF WHERE..." and then to use fields.
I have my single file ORDINI.DBF with index ORDINI.CDX, I don't want to use Clipper command or function: DbUseArea, DbSetIndex, DbSkip, Dbseek...
I'd like to use for this file a simple SQL command "Select * from ORDINI.DBF WHERE..." and then to use fields.
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)
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Re: use DBF file with SQL
You can use DBF with SQL statements, using ADO, but it will not allow you to use its indexes.
But you can use the function FW_DBFSQLQUERY
http://forums.fivetechsupport.com/viewt ... RY#p149080
But you can use the function FW_DBFSQLQUERY
http://forums.fivetechsupport.com/viewt ... RY#p149080
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
-
- Posts: 1033
- Joined: Fri Oct 07, 2005 3:33 pm
- Location: Cochabamba - Bolivia
Re: use DBF file with SQL
Hello,
you can use ADS with DBF/CDX
try to download this sample https://app.box.com/s/r0w5vgxzugucoavqjzpba9he6625gvgu
1.- for a sample define path ./
2.- conectar
3.- in Consulta SQL type select * from customer + ejecutar
regards
Marcelo
P.D.
https://app.box.com/s/t2vd0tfrov42usp1kzgucxxs642bmigx
you can use ADS with DBF/CDX
try to download this sample https://app.box.com/s/r0w5vgxzugucoavqjzpba9he6625gvgu
1.- for a sample define path ./
2.- conectar
3.- in Consulta SQL type select * from customer + ejecutar
regards
Marcelo
P.D.
https://app.box.com/s/t2vd0tfrov42usp1kzgucxxs642bmigx
- damianodec
- Posts: 372
- Joined: Wed Jun 06, 2007 2:58 pm
- Location: Italia
- Contact:
Re: use DBF file with SQL
thank you,
I solved with Navarro.
I solved with Navarro.
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)
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)