Re: EDS Database Choking 2

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

Yes, It was my code....!

I traced thru it again to find that sometime
in the process of writing the loop that I had
reversed delnames and names which threw
me off...

Sorry.

That prior problem with db_delete_table ()
still exist though.

Euman


----- Original Message ----- 
From: "Euman" <euman at bellsouth.net>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, June 09, 2001 21:50
Subject: EDS Database Choking 2


> 
> 
> I think db_record_data( ) in database.e returns what it feels like,
> Maybe it's my code!     " doesnt look like it is "
> 
> This next problem I have is I am storing deleted names
> in a seperate table and when my program starts up
> it parses thru the Deleted Table for a list of  user
> deleted names so the user doesnt have to see them.
> 
> Sometimes this works, sometimes this doesnt....
> Has anyone seen this problem and if so, have a 
> recommended fix?
> 
> Here's my code:
> 
> sequence names
>                names = db_table_list()
> 
> sequence delnames
>                delnames = {}
> 
> integer len
>             len = length(names)
> 
> if db_select_table("Deleted") != DB_OK then
>    puts(2, "Couldn't find table!\n")
>    abort(1)
> end if
>      
> e = db_table_size() 
> 
> if e = 0 then        
> else
> 
>    for x = 1 to e do
>         delnames = append(delnames, db_record_data(x))
>    end for
> 
>    for i = 1 to length(delnames) do        
>         if find(delnames[i],names) then
>            if i = 1 then
>               names = names[2..length(names)] 
>            else
>               names = names[1..i - 1] & names[i + 1..length(names)] 
>            end if
>               names = append(names,{})
>               len -= 1   
>         end if
>    end for
> 
> end if
> 
> names = names[1..len]
> 
> Euman
> 
> 
> 
> 
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu