Armando,
Thanks, I will give it a try.
James
// Read structure of DBF
aFields := dbstruct( "ptime")
aFields := aadd( aFields, { "HBRECNO", "+", 10, 0 } ) // New field (required)
// Create SQL table
lAddAutoInc:=.f. // already added autoinc field above
FW_AdoCreateTableSQL( "ptime", aFields, oCon, lAddAutoInc )
Application
===========
Path and name: C:\Users\James\Documents\Projects\ADORDD\Test8.exe (32 bits)
Size: 2,987,008 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20141106)
FiveWin Version: FWHX 15.05
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 6 secs
Error occurred at: 08/02/15, 13:14:04
Error description: Error BASE/1604 Argument error: SWITCH
Args:
[ 1] = C
Stack Calls
===========
Called from: .\source\function\ADOFUNCS.PRG => ADOCREATECOLSQL( 741 )
Called from: .\source\function\ADOFUNCS.PRG => FW_ADOCREATETABLESQL( 709 )
Called from: Test8.prg => MAIN( 51 )
System
======
CPU type: AMD A8-4555M APU with Radeon(tm) HD Graphics 1600 Mhz
Hardware memory: 3271 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 3
1 GDI+ Window,
2 GDI+ Window, C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9600.17415_none_dad8722c5bcc2d
3 Task Switching, C:\Users\James\Documents\Projects\ADORDD\Test8.exe
Variables in use
================
Procedure Type Value
==========================
ADOCREATECOLSQL
Param 1: C "+"
Param 2: N 0
Local 1: C " [+]"
Local 2: U
Local 3: C ""
Local 4: U
Local 5: U
FW_ADOCREATETABLESQL
Param 1: C "ptime"
Param 2: A Len: 4
Param 3: O Class: TOLEAUTO
Param 4: L .F.
Local 1: A Len: 4
Local 2: U
Local 3: U
Local 4: N 2
Local 5: U
Local 6: N 0
MAIN
Local 1: L .F.
Local 2: C "Northwind.mdb"
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFNTX
ADORDD
DataBases in use
================
Classes in use:
===============
1 ERROR
2 HASHENTRY
3 HBCLASS
4 TOLEAUTO
5 HBOBJECT
6 TREG32
Memory Analysis
===============
368 Static variables
Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes
SELECT 0
USE XTABLE ALIAS XTABLEX VIA DBFCDX
DBGOTOP()
COPY TO XTABLE WHILE !EOF() VIA "ADORDD"
/*
fix to add HBRECNO if it´s not present // Lucas De Beltran 23.05.2015
cannot be first otherwise copy to changes all fields order and values ahf 23.5.2015
*/
n := ASCAN( aWAData[ WA_SQLSTRUCT ],{ |x| x[1] = ADO_GET_FIELD_RECNO( aWAData[ WA_TABLENAME ] ) } )
IF n == 0
AADD( aWAData[ WA_SQLSTRUCT ], { ADO_GET_FIELD_RECNO( aWAData[ WA_TABLENAME ] ), '+', 10, 0 } )
ELSE //FIX AHF CAN ALREADY EXIST AND NOT TRUE INC FIELD
aWAData[ WA_SQLSTRUCT ][n,2] := "+"
aWAData[ WA_SQLSTRUCT ][n,3] := 11
aWAData[ WA_SQLSTRUCT ][n,4] := 0
ENDIF
James Bott wrote:Speed Test Results
Using the new ADORDD and a local drive.
Success at last. I have been able to import a large number of records from a DBF into a SQL table in an ACCESS database using the APPEND FROM command.
Appending 26,191 records with 31 fields from a DBF into an ACCESS table: 18 minutes.
Appending the same records from a DBF into a DBF: 1 second
Hmm, are all SQL databases that slow?
James
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 30 guests