Subject |
xdml append from problem |
From |
Charlie <tm@tc.com> |
Date |
Wed, 28 Aug 2024 15:57:46 -0400 |
Newsgroups |
dbase.getting-started |
I know this is dated but I am having a problem with the append from statement. It seems to only append one record. The append is at the bottom of the code. I am wondering if possibly the code i am using toward the top from mervyn might be affecting this somehow.
Your code works perfect Mervyn but i am wondering if it could be affecting append. Or possibly I am making a stupid error of some kind.
Any help will be very much appreciated.
set procedure to append_from_csv.prg
try
append_from_csv(_app.folder3+'csvrec.dbf','&pth1','d',true)
catch (exception e)
msgbox( "Abort import. File must be CSV format with correct 12 columns." )
return
endtry
use csvrec
count to cnt
if cnt < 1
msgbox( "There there are 0 rows. Cannot proceed." )
return
endif
msgbox( "CSV file successfully imported." )
else
msgbox( "Import aborted." )
endif
set filter to
use csvrec
delete for empty(id) or empty(country)
replace all id with upper(id)
replace all category with upper(category)
replace all grade with upper(grade)
replace all location with upper(location)
replace all country with upper(country)
replace all metal with upper(metal)
replace all mintage with upper(mintage)
replace all details with upper(details)
sele a
use memo
nsk = newsku
sele b
use country
sele c
use collection
go top
append from :coindata:csvrec.dbf// for not empty(id)
I tested this with a message box and it always indicates one record was appended ( out of 13) on my last try.
|
|