Re: EDS Database Problem
- Posted by rudy toews <rltoews at ilos.net> Jun 11, 2005
- 498 views
EU Coder wrote: > > Hello All, > > I have a EDS database and I created a simple procedure to delete a selecte= > d > record from the database. But there seems to be a problem with deleting the= > > correct record from the database. The procedure is finding the correct item= > > and returning the correct record number, but when=20 > db_delete_record(findrecord) is called the last record in the database is= > > deleted, no matter what record is selected. Anyone have a clue what I am= > > doing wrong? I am using the following code: > > procedure Test() > integer findrecord > sequence selecteditem,item > > selecteditem = getLVSelected(MyList) > > item = getLVItemText(MyList, selecteditem[1],1) > if db_select_table("Table1") != DB_OK then > end if > findrecord = db_find_key(item) > db_delete_record(findrecord) > end procedure > > i have not finished my own program, but looking at another program from the archives, the record number should be an atom , not an integer but you would think an error message would be generated? it probably points to last record set because it was the last record read in. rudy