cnavarro wrote:Intenta no cerrando el oRs:Close()
El mismo error
Can not create OCRD
cnavarro wrote:Intenta no cerrando el oRs:Close()
cnavarro wrote:Tampoco estás cerrando la conexión oCn:Close antes verdad?
cnavarro wrote:No podia funcionar con la conexion cerrada
Prueba con FW_AdoTables( oCn )
#include "fivewin.ch"
REQUEST DBFCDX
function Main()
local cServer := "SQLEXPRESS"
local cUser := "SA"
local cPassword := "1234"
local cDatabase := "SBODemoUS"
local cTable := "RCD"
local cdbf := "RCD.DBF"
local lEditStruct := .F.
local oCn, oRs
oCn := FW_OpenAdoConnection( { "MSSQL", cServer, cDatabase, cUser, cPassword }, .t. )
if oCn == nil
? "Connect Fail"
else
? "Connected."
oRs := FW_OpenRecordSet( oCn, cTable )
if oRs == nil
? "Can not open " + cTable
else
XBROWSER oRs FASTEDIT
cDBF := cFileSetExt( cDBF, "dbf" )
FW_AdoExportToDBF( oRs, cDbf, .t. )
XBROWSER cDBF FASTEDIT
oRs:Close()
endif
oCn:Close()
endif
return nil
#include "FiveWin.ch"
//----------------------------------------------------------------//
REQUEST DBFCDX
function Main()
local cServer := "localhost\SQLEXPRESS"
local cDatabase := "SBODemoUS"
local oCn, oRs, aTables, cTable
oCn := FW_OpenAdoConnection( { "MSSQL", cServer, cDatabase }, .t. )
aTables := FW_AdoTables( oCn )
if oCn == nil
? "Connect Fail"
else
XBROWSER aTables
endif
FOR EACH cTable IN aTables
oRs := FW_OpenRecordSet( oCn, cTable )
FW_AdoExportToDBF( oRs, cTable, .F. )
oRs:Close()
NEXT
? "EXPORTACION FINALIZADA"
oCn:Close()
return nil
//----------------------------------------------------------------//
Compuin wrote:Listo
Excluyendo la Tabla CASE se logro realizar el export exitosamente.
Ahora, existe alguna funcion que importe las DBF a Mysql?
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 13 guests