Re: Too many lines too add in one go

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 50431
interpreted = N
texte = Try using an [append] context rather than [replace] with append=T. Then you can dispense with the closedb [context]. And why do you create [numsold]=0 only to add it to something else. And I think you should put the [append] inside the middle search, then you don't even need to create a [numsold] variable at all.Maybe this will do the trick.[search db=/db/dbase1.db&neSKUdatarq=dikkelul] [founditems] [search db=/db/dbase2.db&eqOrderSKUdatarq=[SKU]] [founditems] [Append db=/db/topskus.db]SKU=[SKU]&sold=[OrderQTY][/Append] [/founditems] [/search][/founditems] [/search]Regards, Tim > From: Rene van der Velde > Reply-To: (WebDNA Talk) > Date: 16 May 2003 16:08:31 > To: (WebDNA Talk) > Subject: Re: Too many lines too add in one go > > ok here she goes then :) > > if i put a max=1000 in the first search it won't time out. > i tried it without the replace, so its one of the searches that is timing out > and not the replace. > How can i put the whole thing in a loop of smaal chunks? > > dbase1 contains +/- 6000 items less than 1 mb > dbase2 contains +/- 11000 items +/-1,4MB > > and now the code..... > ---------------------------------------------------------------- > [search db=/db/dbase1.db&neSKUdatarq=dikkelul] > > > [founditems] > > [search db=/db/dbase2.db&eqOrderSKUdatarq=[SKU]] > [math show=F]numsold=0[/math] > [founditems] > > [math show=f]numsold=[math]numsold[/math]+[OrderQTY][/math] > > > > [/founditems] > [/search] > > sku=[SKU], Sold=[numsold]
> > [replace append=T&db=/db/topskus.db&eqSKUdatarq=[SKU]]sold=[numsold][/replace] > > > [/founditems] > [/search] > [closedatabase db=/db/dbase1.db] > > > > ----------------------------------------------------------------- > > On vrijdag, 16 mei 2003, WJ Starck wrote: >> What are you replacing that causes a time out? >> >> This sounds a bit unusual. >> >> I'd make sure you don't have some faulty code somewhere. >> >> Other things to try: >> >> 1) Increase the seconds to wait for busy database in your WebDNA prefs >> 2) Add RAM (if possible) >> >> Show us a code snippet... >> >> -- >> >> Will Starck >> NovaDerm Skincare Science >> http://www.novaderm.com >> wjs@novaderm.com >> >> >> On Friday, May 16, 2003, at 05:34 AM, Tim Robinson wrote: >> >>> I would say that it depends what you are replacing. If it's possible >>> to use >>> the [replacefounditems] context, use that. You could possibly use >>> [spawn], >>> but it would help to post the appropriate code... >>> >>> Regards, >>> Tim >>> >>>> From: Rene van der Velde >>>> Reply-To: (WebDNA Talk) >>>> Date: 16 May 2003 11:59:43 >>>> To: (WebDNA Talk) >>>> Subject: Too many lines too add in one go >>>> >>>> Hello. This is probably a very newbie question but i'm a little stuck >>>> here. >>>> >>>> I'm doing a replace in a db wich times out everytime. >>>> >>>> So I need to do the replace in chunks. >>>> >>>> I've been reading up on the Loop context but it only mentiones a >>>> fixed start >>>> and end variable. The database it is reading from does not have a >>>> fixed number >>>> of items so i wouldn't know the Last end of the loop. >>>> >>>> How can I do the replace with chunks of, say 50 items ? >>>> >>>> >>>> ------------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> To switch to the DIGEST mode, E-mail to >>>> >>>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>>> >>> >>> >>> ------------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >>> >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ >> > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Too many lines too add in one go (Tim Robinson 2003)
  2. OT: Re: Too many lines too add in one go (Rene van der Velde 2003)
  3. Re: Too many lines too add in one go (Rene van der Velde 2003)
  4. Re: Too many lines too add in one go (WJ Starck 2003)
  5. Re: Too many lines too add in one go (Tim Robinson 2003)
  6. Too many lines too add in one go (Rene van der Velde 2003)
Try using an [append] context rather than [replace] with append=T. Then you can dispense with the closedb [context]. And why do you create [numsold]=0 only to add it to something else. And I think you should put the [append] inside the middle search, then you don't even need to create a [numsold] variable at all.Maybe this will do the trick.[search db=/db/dbase1.db&neSKUdatarq=dikkelul] [founditems] [search db=/db/dbase2.db&eqOrderSKUdatarq=[SKU]] [founditems] [Append db=/db/topskus.db]SKU=[SKU]&sold=[OrderQTY][/Append] [/founditems] [/search][/founditems] [/search]Regards, Tim > From: Rene van der Velde > Reply-To: (WebDNA Talk) > Date: 16 May 2003 16:08:31 > To: (WebDNA Talk) > Subject: Re: Too many lines too add in one go > > ok here she goes then :) > > if i put a max=1000 in the first search it won't time out. > i tried it without the replace, so its one of the searches that is timing out > and not the replace. > How can i put the whole thing in a loop of smaal chunks? > > dbase1 contains +/- 6000 items less than 1 mb > dbase2 contains +/- 11000 items +/-1,4MB > > and now the code..... > ---------------------------------------------------------------- > [search db=/db/dbase1.db&neSKUdatarq=dikkelul] > > > [founditems] > > [search db=/db/dbase2.db&eqOrderSKUdatarq=[SKU]] > [math show=F]numsold=0[/math] > [founditems] > > [math show=f]numsold=[math]numsold[/math]+[OrderQTY][/math] > > > > [/founditems] > [/search] > > sku=[SKU], Sold=[numsold]
> > [replace append=T&db=/db/topskus.db&eqSKUdatarq=[SKU]]sold=[numsold][/replace] > > > [/founditems] > [/search] > [closedatabase db=/db/dbase1.db] > > > > ----------------------------------------------------------------- > > On vrijdag, 16 mei 2003, WJ Starck wrote: >> What are you replacing that causes a time out? >> >> This sounds a bit unusual. >> >> I'd make sure you don't have some faulty code somewhere. >> >> Other things to try: >> >> 1) Increase the seconds to wait for busy database in your WebDNA prefs >> 2) Add RAM (if possible) >> >> Show us a code snippet... >> >> -- >> >> Will Starck >> NovaDerm Skincare Science >> http://www.novaderm.com >> wjs@novaderm.com >> >> >> On Friday, May 16, 2003, at 05:34 AM, Tim Robinson wrote: >> >>> I would say that it depends what you are replacing. If it's possible >>> to use >>> the [replacefounditems] context, use that. You could possibly use >>> [spawn], >>> but it would help to post the appropriate code... >>> >>> Regards, >>> Tim >>> >>>> From: Rene van der Velde >>>> Reply-To: (WebDNA Talk) >>>> Date: 16 May 2003 11:59:43 >>>> To: (WebDNA Talk) >>>> Subject: Too many lines too add in one go >>>> >>>> Hello. This is probably a very newbie question but i'm a little stuck >>>> here. >>>> >>>> I'm doing a replace in a db wich times out everytime. >>>> >>>> So I need to do the replace in chunks. >>>> >>>> I've been reading up on the Loop context but it only mentiones a >>>> fixed start >>>> and end variable. The database it is reading from does not have a >>>> fixed number >>>> of items so i wouldn't know the Last end of the loop. >>>> >>>> How can I do the replace with chunks of, say 50 items ? >>>> >>>> >>>> ------------------------------------------------------------- >>>> This message is sent to you because you are subscribed to >>>> the mailing list . >>>> To unsubscribe, E-mail to: >>>> To switch to the DIGEST mode, E-mail to >>>> >>>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>>> >>> >>> >>> ------------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >>> >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ >> > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Tim Robinson

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Are they really global tags? (2002) Rhapsody? (1997) Help with Repost Data msg from form (1997) [WebDNA] Stop hacking (2013) HELP WITH DATES (1997) carriage returns in data (1997) [if] and [showif] - A solution (2002) WC Database Format (1997) in conversions.db crashes unix webcat (1999) [sendmail] questions... (1997) RE: Purchased cart being overwritten (1997) old problem (2001) [WebDNA] =?utf-8?B?UmU6IFtXZWJETkFdIFdlYkROQSBIb3N0IGJlaW5nIHJldGlyZWQ=?= (2014) Summing fields (1997) Where is Orders.db appended? (2000) Multiple catalog databases and showcart (1997) CAll me Crazy (2000) PSC recommends what date format yr 2000??? (1997) RE: Credit card processing - UK (1997) Trouble with Netscape (1998)