FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour string sql in dbf
Posts: 139
Joined: Fri Nov 25, 2005 04:38 PM

string sql in dbf

Posted: Sat Jul 09, 2011 07:48 PM

I am using the Microsoft Visual Foxpro library, it is possible to open DBF using SQL string I put it in cool ADORDD

ps. the opening speed and filter is super fast

link: http://www.microsoft.com/download/en/de ... x?id=14839
Ronaldo Minacapelli

Ronaldo Minacapelli
Sistemas, Hospedagem e Criação de WebSites
http://www.bazevani.com.br
Posts: 139
Joined: Fri Nov 25, 2005 04:38 PM

Re: string sql in dbf

Posted: Tue Jul 12, 2011 11:38 PM

see exemple

try
oRs := CreateObject("ADODB.RecordSet")
oRs:CursorLocation := adUseClient
oRs:LockType := adLockOptimistic
oRs:CursorType := adOpenDynamic
oRs:ActiveConnection := "Provider=VFPOLEDB.1;Data Source="+Curdrive()+":\"+Curdir()+";Mode=Read;Extended Properties=DBASE IV"
catch
oDlg:Refresh()
If MsgYesno("Erro no acesso ao OLEDB Visual FoxPro, deseja baixa-lo agora? ","Drive VFP")
ShellExecute( 0, "open", "http://www.bazevani.com.br/atualizacao/VFPOLEDBSetup.msi" )
Else
oDlg:Refresh()
MsgStop("Operação cancelada, necessÔrio a instalação do drive: OLEDB Visual FoxPro","Erro !")
Endif

oDlg:Refresh()
return(.T.)

end

try
oRs:Source := cSQL1
oRs:Open()
catch
oDlg:Refresh()
MsgStop("Operação cancelada, ocorreu alguem problema na leitura do arquivo internet.dbf","Erro !")
oDlg:Refresh()
return(.T.)
end

While .NOT. oRs:Eof

 nNro := oRs:Fields("Imovel"):value
Ronaldo Minacapelli
Sistemas, Hospedagem e Criação de WebSites
http://www.bazevani.com.br

Continue the discussion