Is possible use DBF via ADO ? and use command SQL.
if yes, can show a sample please
thanks so much.
DBF via ADO
Re: DBF via ADO
I beleive that you can open DBF files via ADO
Assuming your DBF files exists on C:\
You can use any ODBC statement (Create table, Insert Into, Delete, Select ...). You can address the table using several ways:
Select * from Persons
Select * from Persons.DBF
Insert Into Persons#DBF Values (...)
Delete * from [Persons.DBF] Where ...
Create Table [Any Long File Name You Want] As ...
Regards
Anser
Assuming your DBF files exists on C:\
Code: Select all
oConn:= CreateObject("ADODB.Connection")
oConn:Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=DBASE IV"
cSQL = "SELECT * FROM HPCLAIM WHERE Peril='WTR' AND Incurred >= 50000 AND Incurred <= 100000"
rsClaims = CreateObject("ADODB.Recordset")
rsClaims:CursorLocation = 3 // adUseClient
rsClaims:CursorType = 3 // adOpenStatic
rsClaims:ActiveConnection:= oConn
rsClaims:Open cSQL
Select * from Persons
Select * from Persons.DBF
Insert Into Persons#DBF Values (...)
Delete * from [Persons.DBF] Where ...
Create Table [Any Long File Name You Want] As ...
Regards
Anser
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: DBF via ADO
Perfect.
Last edited by lailton.webmaster on Tue Oct 06, 2009 4:00 pm, edited 1 time in total.
Re: DBF via ADO
Tire o .DBF que deve funcionar ! Eu uso sem informar as extensão.
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: DBF via ADO
blz funcionou legal,
obrigado.
obrigado.