I found that function in \Harbour\source\rdd\dbcmd.c and in \Harbour\include\hbextern.ch files. I heard about this function from G. Filatov.
I also have a demo which run on HMG Extended.
Please don't misunderstand me. I don't want to compare with 2 versions. I am telling about this because temporary table is really useful for programmers (especially those came from VFP )#include <minigui.ch>
Function Main
SET DELETED ON
define window winMain ;
at 0, 0 ;
width 640 height 400 main ;
title "Temporary Table" ;
on init CreateTemp()
DEFINE BROWSE brwTemp
COL 0
ROW 0
WIDTH 600
HEIGHT 340
HEADERS {"Item Code", "Item Description", "Rate"}
WIDTHS {125, 300, 100}
WORKAREA curItem
FIELDS {"curitem->itemcd", "curitem->itemnm", "curItem->rate"}
ALLOWEDIT .T.
INPLACEEDIT .T.
ALLOWAPPEND .T.
ALLOWDELETE .T.
LOCK .T.
JUSTIFY {0, 0, 1}
END BROWSE
@ 350, 0 label lblShow value "Alt-A: Add, Dbl-Click: Modify, Del: Delete" AUTOSIZE
end window
winMain.center
winMain.activate
Return
function CreateTemp()
local aDbf := {}
aadd(adbf, {"itemcd", "c", 10, 0})
aadd(adbf, {"itemnm", "c", 40, 0})
aadd(adbf, {"rate", "n", 8, 2})
if !hb_dbcreatetemp("curItem", adbf)
msgbox("Cannot create temporary table: Item")
RELEASE WINDOW ALL
return nil
endif
if select("curItem") = 0
use curItem new
endif
select curItem
append blank
curItem->itemcd := "CD"
curItem->itemnm := "Compact Disck"
curItem->rate := 10.00
unlock
return nil
Please correct me if I am wrong.
With best regards.
Sudip