dorneles Posted December 14, 2012 Report Share Posted December 14, 2012 Alguem sabe, como importar os dados do ACCESS. O banco de dados esta bloqueado para leitura. FW 2.6 + HB 0.9950 + Pelles + Clipper 5.3 + VLib + xDevStudio Quote Link to comment Share on other sites More sharing options...
dorneles Posted December 14, 2012 Author Report Share Posted December 14, 2012 Alguem sabe, como importar os dados do ACCESS. O banco de dados esta bloqueado para leitura. FW 2.6 + HB 0.9950 + Pelles + Clipper 5.3 + VLib + xDevStudio Quote Link to comment Share on other sites More sharing options...
sambomb Posted December 14, 2012 Report Share Posted December 14, 2012 Acho que tem como abrir e mandar salvar como XLS ou DBF... Sei que se tiver como salvar como XLS você pode abrir pelo Open Office e salvar como DBF RCA Sistemas - Itaocara - RJ Quote Link to comment Share on other sites More sharing options...
lecojales Posted December 14, 2012 Report Share Posted December 14, 2012 Dorneles, bom dia. O office 2003, já salva em dbf direto. Mas.. ******************************************************************************* * Versão 1.0 * ******************************************************************************* //#include "atualw.ch" #include "adordd.ch" Function Main Local cCodigo,cDescricao,Tecla,criterio Local cn := CreateObject("ADODB.Connection") Local rs := CreateObject("ADODB.Recordset") set date brit set cent on cls cn:Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=nomebanco.mdb") sql:= "select * from clientes c inner join municipios m on c.idcidaderes = m.idmunicipio order by c.idcliente" rs:Open(sql, cn, 2, 3) select 1 use cliente zap Rs:MoveFirst() do while !Rs:Eof() select 1 append blank replace ccodigo with RS:Fields["IDCliente"]:Value() replace ccgc with RS:Fields["CpfCnpj"]:Value() replace crazao with RS:Fields["Nome"]:Value() if RS:Fields["Bloqueado"]:Value() replace cbloqueia with "S" else replace cbloqueia with "N" endif if valtype(RS:Fields["Tratamento"]:Value()) <> "U" replace cfanta with RS:Fields["Tratamento"]:Value() endif if valtype(RS:Fields["Nascimento"]:Value()) <> "U" replace cdtnasc with RS:Fields["Nascimento"]:Value() endif replace cie with RS:Fields["RgInscricao"]:Value() if valtype(RS:Fields["CONTATO"]:Value()) <> "U" replace ccontato with RS:Fields["CONTATO"]:Value() endif replace cender with RS:Fields["EnderecoRes"]:Value()+", "+RS:Fields["NumeroRes"]:Value() replace cbairro with RS:Fields["BairroRes"]:Value() replace ccidade with RS:Fields["Descricao"]:Value() replace cuf with RS:Fields["UF"]:Value() replace ccep with substr(RS:Fields["CepRes"]:Value,1,2)+"."+substr(RS:Fields["CepRes"]:Value,3,3)+"-"+substr(RS:Fields["CepRes"]:Value,6,3) //replace cfone with "("+strzero(val(RS:Fields["TelefoneResDdd"]:Value),2)+")"+RS:Fields[substr(TelefoneRes,1,4)]:Value+"-"+RS:Fields[substr(TelefoneRes,4,4)]:Value replace cfax with "" //replace ccelul with "("+strzero(val(RS:Fields["celularDdd"]:Value),2)+")"+RS:Fields[substr(Celular,1,4)]:Value+"-"+RS:Fields[substr(Celular,4,4)]:Value replace cenderent with cender replace cbairent with cbairro replace ccident with ccidade replace cufent with cuf if valtype(RS:Fields["CADASTRO"]:Value()) <> "U" replace ccadastro with RS:Fields["CADASTRO"]:Value endif replace cobs with "CONVERTIDO!!!"+RS:Fields["Observacoes"]:Value Rs:MoveNext() Enddo rs:Close() Cn:Close() close databases return id=code>id=code>Leco Five PPC Harbour 1.0.1 - 1999-2008 Quote Link to comment Share on other sites More sharing options...
dorneles Posted December 14, 2012 Author Report Share Posted December 14, 2012 tentei abrir pelo access, mas ele da uma mensagem que EU NAO TENHO PERMISSAO PARA ABRIR. FW 2.6 + HB 0.9950 + Pelles + Clipper 5.3 + VLib + xDevStudio Quote Link to comment Share on other sites More sharing options...
lecojales Posted December 14, 2012 Report Share Posted December 14, 2012 citação:tentei abrir pelo access, mas ele da uma mensagem que EU NAO TENHO PERMISSAO PARA ABRIR. FW 2.6 + HB 0.9950 + Pelles + Clipper 5.3 + VLib + xDevStudio id=quote>id=quote> Ai vai precisar quebrar a senha, eu tinha um programa, mas só DEUS que sabe a onde está. O código acima le ele depois de ter tirado a senha. Leco Five PPC Harbour 1.0.1 - 1999-2008 Quote Link to comment Share on other sites More sharing options...
Geraldo (gbsilva) Posted December 14, 2012 Report Share Posted December 14, 2012 Dorneles veja este link. http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=20166 Pelo jeito o banco esta mesmo protegido por senha. Sds Geraldo B. Silva Fwh1202 Fev/2012, xHarbour 2.0, Bcc582, Pelles, xDev, Sqllib, Tdolphin e MySql. lucgera@terra.com.br São Paulo - SP Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.