Re: EDS Database Problem

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

EU Coder wrote:
> 
> Ok I found the problem and it is a very odd bug. The problem has nothing to=
> 
> do with the procedure itself, but it seems the Active X SkinCrafter wrapper=
> 
> I am using is conflicting with something in EU. I have no idea what it is,=
> 
> but when I remove the wrapper it works fine, but as soon as I enable it, th=
> e
> procedure I posted does not work. What is confusing me is the fact the
> wrapper should have nothing to do with the database. The SkinCrafter lib is=
> 
> used for skinning the application. Why would it conflict with EDS?
> 
> 
> >From: EU Coder <eucoder at hotmail.com>
> >Reply-To: EUforum at topica.com
> >To: EUforum at topica.com
> >Subject: Re: EDS Database Problem
> >Date: Sat, 11 Jun 2005 16:52:31 -0400
> >
> >
> >Nope that didnt work. I am starting to think there is another factor in=
> 
> >all=
> >
> >of this. I am going to look over my code and try and track it down.
> >
> >Thanks...
> >
> >>From: Greg Haberek <ghaberek at gmail.com>
> >>Reply-To: EUforum at topica.com
> >>To: EUforum at topica.com
> >>Subject: Re: EDS Database Problem
> >>Date: Sat, 11 Jun 2005 16:35:40 -0400
> >>
> >>
> >> > 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
> >>
> >>If you're just grabbing the first column of text, use
> >>getLVSelectedText() instead of getLVSelected() and getLVItemText().
> >>That should help iron out some wrinkles. Also, a little more fact
> >>checking always helps spot a few bugs. I re-worked your routine, give
> >>it a shot and see if it works.
> >>
> >>}}}
<eucode>
> >>procedure Test()
> >>
> >>   sequence selected
> >>   integer rec
> >>
> >>   selected = getLVSelectedText( MyList )
> >>   if length(selected) = 0 then
> >>     -- no items selected
> >>     return
> >>   end if
> >>
> >>   if db_select_table("Table1") != DB_OK then
> >>     -- table not available
> >>     return
> >>   end if
> >>
> >>   -- walk 'up' the items, deleting each one
> >>   for i = length(selected) to 1 by -1 do
> >>     rec = db_find_key( selected[i] )
> >>     if rec > 0 then
> >>       -- record found, delete it
> >>       db_delete_record( rec )
> >>     end if
> >>   end for
> >>
> >>end procedure
> <font color="#330033">>></eucode>
{{{
</font>
> >>
> >
> >Security. <a
> >href="http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963">http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963</a>
> >
> >

Are you sure it's not the getLVSelectedText() that is causing problems?

Regards, Alexander Toresson

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

Search



Quick Links

User menu

Not signed in.

Misc Menu