Re: deleting files

new topic     » goto parent     » topic index » view thread      » older message » newer message

All puts(1........) supply expected info, except for the one commented

 
procedure delete_Rel_records() 
	sequence FileName 
puts(1,to_string(personKey) & CrLf) 
	db_select_table("birth") x = db_find_key(personKey) if x > 0 then puts(1,"birth " & to_string(x) & CrLf) end if --db_delete_record(x) end if 
	db_select_table("death") x = db_find_key(personKey) if x > 0 then puts(1,"death " & to_string(x) & CrLf) end if --db_delete_record(x) end if 
	db_select_table("parents") x = db_find_key(personKey) if x > 0 then puts(1,"parents " & to_string(x) & CrLf) end if --db_delete_record(x) end if 
	db_select_table("spouse") x = db_find_key(personKey) if x > 0 then puts(1,"spouse " & to_string(x) & CrLf) end if --db_delete_record(x) end if 
	db_select_table("marriages") x = db_find_key(personKey) if x > 0 then puts(1,"marriages " & to_string(x) & CrLf) end if --db_delete_record(x) end if 
	db_select_table("relative") x = db_find_key(personKey) if x > 0 then puts(1,"relative " & to_string(x) & CrLf) end if --db_delete_record(x) end if	 
	db_select_table("citation") x = db_find_key(personKey) if x > 0 then puts(1,"citations " & to_string(x) & CrLf) end if --db_delete_record(x) end if 
	db_select_table("photographs") x = db_find_key(personKey)  
	if x > 0 then puts(1,"photographs " & to_string(x) & "  ")  
		 
		FileName = db_record_data(x)  
		puts(1,to_string(length(FileName)) ) 
		if length(FileName)>2 then 
			puts(1,to_string(FileName) & "  ") 
			puts(1,pathToPhoto & surName & "\\" & FileName & CrLf)  
			if chdir(pathToPhoto & surName & "\\")=1 then 
				puts(1,"path is " & curdir() ) --pathToPhoto & surName & CrLf) 
				if delete_file(FileName )=1 then 
-- this puts(1,....) does not show up....... 
					puts(1,"deleted " & FileName & CrLf) 
				end if 
-- will leave until delete works properly	 
				--db_delete_record(x)  
			end if 
		end if 
	end if 
	 
end procedure 
 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu