Acabo de fazer funcionar o ADS em 64 bits.
Usei o instalador do Visual Studio, alterando a pasta pra SysWow64, e registrando o que podia ser registrado.
Depois, usando seu conector de ADO preferencial, só usar comandos SQL sobre DBFs.
Ou... esqueci de mencionar isso da outra vez:
O ADO não é LIB, é uma CLASSE.
Está disponível no Windows, e é só usar.
Pra quem quiser brincar com DBFs
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Pra quem quiser brincar com DBFs
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- rochinha
- Administrador

- Mensagens: 4664
- Registrado em: 18 Ago 2003 20:43
- Localização: São Paulo - Brasil
- Contato:
Pra quem quiser brincar com DBFs
Amiguinhos,
José Quintas
Não entendi a relação ADS com Visual Studio.
Afinal você instalou o Visual Studio e teve de registrar a mão o ADO no 64bits?
Deixa a dica ou passos que usou para isto.
José Quintas
Não entendi a relação ADS com Visual Studio.
Afinal você instalou o Visual Studio e teve de registrar a mão o ADO no 64bits?
Deixa a dica ou passos que usou para isto.
OPS! LINK QUEBRADO? Veja ESTE TOPICO antes e caso não encontre ENVIE seu email com link do tópico para [url=mailto://fivolution@hotmail.com]fivolution@hotmail.com[/url]. Agradecido.
@braços : ? )
A justiça divina tarda mas não falha, enquanto que a justiça dos homens falha porque tarda.
@braços : ? )
A justiça divina tarda mas não falha, enquanto que a justiça dos homens falha porque tarda.
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Pra quem quiser brincar com DBFs
Eu tinha uma instalação aqui que criei.
Apenas alterei a pasta destino pra SysWow64.
Essa instalação registra as DLLs que podem ser registradas.
Então seria o equivalente a copiar e registrar.
Nota: A não ser que a parte default do VB instale o algo mais que faz falta no W64.
Apenas alterei a pasta destino pra SysWow64.
Essa instalação registra as DLLs que podem ser registradas.
Então seria o equivalente a copiar e registrar.
Nota: A não ser que a parte default do VB instale o algo mais que faz falta no W64.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Pra quem quiser brincar com DBFs
Um fonte para os testes:
O comando digitado:
o resultado na tela:
Outro comando:
Outro resultado:
No DBF, dentre outros campos:
É brincar com SQL usando DBFs.
Código: Selecionar todos
#include "inkey.ch"
PROCEDURE Main
LOCAL oConexao, oRecordset, oElement, cSql, nCont, nCont2, nKey
LOCAL aCmdList := Array(10)
SetMode( 40, 100 )
FOR EACH oElement IN aCmdList
oElement := Space(90)
NEXT
oConexao := win_OleCreateObject( "ADODB.Connection" )
oConexao:ConnectionString := ADSString( hb_cwd() )
oConexao:Open()
DO WHILE .T.
CLS
@ 1, 0 SAY ""
FOR EACH oElement IN aCmdList
@ Row() + 1, 1 GET oElement
NEXT
READ
IF LastKey() == K_ESC
EXIT
ENDIF
cSql := ""
FOR EACH oElement IN aCmdList
cSql := cSql + Trim( oElement ) + " "
NEXT
//BEGIN SEQUENCE WITH __BreakBlock()
oRecordset := oConexao:Execute( cSql )
//END SEQUENCE
IF oRecordset == NIL
LOOP
ENDIF
nKey := 0
DO WHILE nKey != K_ESC .AND. .NOT. oRecordset:Eof()
FOR nCont = 1 TO oRecordset:Fields:Count()
?? oRecordset:Fields( nCont - 1 ):Value
NEXT
?
nKey := Inkey()
oRecordset:MoveNext()
ENDDO
oRecordset:Close()
oRecordset := NIL
Inkey(0)
ENDDO
oConexao:Close()
RETURN
FUNCTION ADSString( cPath )
LOCAL cString
cString := "Provider=Advantage.OLEDB.1;Mode=Share Deny None;" + ;
"Show Deleted Records in DBF Tables with Advantage=False;" + ;
"Data Source=" + cPath + ";Advantage Server Type=ADS_Local_Server;" + ;
"TableType=ADS_CDX;Security Mode=ADS_IGNORERIGHTS;" + ;
"Lock Mode=Compatible;Use NULL values in DBF Tables with Advantage=True;" + ;
"Exclusive=No;Deleted=No;"
RETURN cString
Código: Selecionar todos
select cdcidade, cduf, cdcep from jpcadas
Código: Selecionar todos
SAO JOSE DOS CAMPOS SP12237-823
DIADEMA SP09920-578
SAO PAULO SP02284-000
SAO PAULO SP04794-000
RIBEIRAO PIRES SP09403-100
SAO PAULO SP03694-000
BARUERI SP06433-190
SAO PAULO SP02130-020
SAO PAULO SP02133-010
SAO PAULO SP04578-000
ATIBAIA SP12954-260
SAO PAULO SP04222-020
GUARULHOS SP07013-000
SUZANO SP08676-010
SAO PAULO SP08115-100
TABOAO DA SERRA SP06785-300
COTIA SP06709-046
SANTOS SP11045-906
SAO PAULO SP04794-000
SAO PAULO SP02520-000
TABOAO DA SERRA SP06763-230
SAO PAULO SP02283-000
SAO PAULO SP04829-280
OSASCO SP06223-200
RIBEIRAO PIRES SP09412-000
SAO PAULO SP00000-000
SAO PAULO SP05802-140
SAO PAULO SP08115-000
GUARULHOS SP07176-000
OSASCO SP06290-180
COTIA SP06713-100
SAO PAULO SP04133-300
TABOAO DA SERRA SP06768-000
SAO PAULO SP04662-003
SAO PAULO SP05083-030
PIEDADE SP18170-000
COTIA SP06709-046
SAO PAULO SP01220-020
SANTO ANDRE SP09260-510
Código: Selecionar todos
select count(*) AS qtd, cdcidade from jpcadas group by cdcidade
Código: Selecionar todos
1STO ANTONIO D PINHAL
2SUMARE
35SUZANO
23TABOAO DA SERRA
1TAGUATINGA
1TANGUA
2TATUI
5TAUBATE
1TEIXEIRA DE FREITAS
2TEOFILO OTONI
1TERESINA
2TERESOPOLIS
1TIMOTEO
1TRAMANDAI
1TRES RIOS
1TUPA
1UBERABA
5UBERLANDIA
2UMUARAMA
1URUACU
1URUGUAIANA
1VACARIA
1VALINHOS
1VARGEM GRANDE DO SUL
4VARGEM GRANDE PAULIST
4VARZEA PAULISTA
1VENANCIO AIRES
2VIAMAO
2VICOSA
1VILA QUILHERME
1VILA VELHA
1VINHEDO
4VITORIA
2VITORIA DA CONQUISTA
1VL MARIA
2VOLTA REDONDA
2VOTORANTIM
2VOTUPORANGA
1XAXIM
Código: Selecionar todos
CDCIDADE, C, 21
CDUF, C, 2
CDCEP, C, 9
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Pra quem quiser brincar com DBFs
Aproveitei pra testar o comando do outro post.
Funcionou exatamente igual nos DBF.
mostrou 17, que é o resultado.
Mesma sintaxe no MySQL, e no ADS Local com DBFs.
Funcionou exatamente igual nos DBF.
Código: Selecionar todos
select count(*) as qtd from
( select locador, locatario, sum(rateio) as soma
from hldimrat where locador=3304
group by locador, locatario )
as resultado
where soma=100
Mesma sintaxe no MySQL, e no ADS Local com DBFs.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/