[quote="cnavarro":2x5wb8l8]No podia funcionar con la conexion cerrada
Prueba con FW_AdoTables( oCn )[/quote:2x5wb8l8]
Hola Cristobal, utilizando este codigo
[b:2x5wb8l8]#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
//----------------------------------------------------------------//[/b:2x5wb8l8]
Comienza a realizar la exportacion de las tablas a archivos .Dbf, pero luego se detiene y arroja este error
Incorrect syntax near the keyword 'CASE'
Source : Microsoft SQL Server Native Client 11.0
NativeError: 156
Error Source: Microsoft SQL Server Native Client 11.0
Sql State: 42000
--------------------------------------------
FW_OPENRECORDSET( 437 )
Mas
Application
===========
Path and name: C:\fwh1705\samples\mssql01.exe (32 bits)
Size: 3,793,920 bytes
Compiler version: Harbour 3.2.0dev (r1703231115)
FiveWin version: FWH 17.05
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 22 secs
Error occurred at: 07/14/17, 11:04:27
Error description: Error BASE/1004 No exported method: FIELDS
Args:
[ 1] = U
Stack Calls
===========
Called from: => FIELDS( 0 )
Called from: .\source\function\ADOFUNCS.PRG => FWADOSTRUCT( 1747 )
Called from: .\source\function\ADOFUNCS.PRG => FW_ADOEXPORTTODBF( 1192 )
Called from: mssql01.prg => MAIN( 26 )
Algun advise ?
↧