Re: Updating Prices in Online Database

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23403
interpreted = N
texte = >I did a test to update my database by using the following code: > >[showif [dbpassword]=abcd] >[search db=newcatalog.db&neskudatarq=[blank]&max=8000] > [FoundItems] >[Replace db=catalogtest.db]price=[price]] [/Replace] >[/FoundItems] >[numFound] - records have been updated[/search] >[/showif] >[showif [dbpassword]!abcd] >Sorry, that password is not valid >[/showif] > > >This did not replace the database with the new prices, like I had hoped >it would. I received no syntax error messages and 30 items were found, >yet the prices were not updated. Is there something I am missing in the >code? or am I doing something incorrectly?Yes, you are doing two thing incorrectly that I can see offhand. (1) The replace context has an extra ending brackets and an extraneous space after the word price, both of these characters should be removed. (2) The replace context fails to identify which record you want replaced, because you have not defined which record it should replace. Try writing your [replace] tag like this:[Replace db=catalogtest.db&sku=[sku]]price=[newPrice][/Replace]This assumes your catalogtest.db has a sku field as a unique record identifier. Sincerely, Ken Grome Associated Messages, from the most recent to the oldest:

    
  1. Re: Updating Prices in Online Database (Kenneth Grome 1999)
  2. Re: Updating Prices in Online Database (Mike Eberly 1999)
  3. Re: Updating Prices in Online Database (Kenneth Grome 1999)
  4. Re: Updating Prices in Online Database (Gil Poulsen 1999)
  5. Re: Updating Prices in Online Database (Mike Eberly 1999)
  6. Re: Updating Prices in Online Database (Mike Eberly 1999)
  7. Re: Updating Prices in Online Database (Carlos Machado 1999)
  8. Re: Updating Prices in Online Database (PCS Technical Support 1999)
  9. Re: Updating Prices in Online Database (Carlos Machado 1999)
  10. Re: Updating Prices in Online Database (Gil Poulsen 1999)
  11. Re: Updating Prices in Online Database (The Mooseman 1999)
  12. Re: Updating Prices in Online Database (Nitai 1999)
  13. Re: Updating Prices in Online Database (Mike Eberly 1999)
  14. Re: Updating Prices in Online Database (Gil Poulsen 1999)
  15. Updating Prices in Online Database (Mike Eberly 1999)
>I did a test to update my database by using the following code: > >[showif [dbpassword]=abcd] >[search db=newcatalog.db&neskudatarq=[blank]&max=8000] > [founditems] >[Replace db=catalogtest.db]price=[price]] [/Replace] >[/FoundItems] >[numFound] - records have been updated[/search] >[/showif] >[showif [dbpassword]!abcd] >Sorry, that password is not valid >[/showif] > > >This did not replace the database with the new prices, like I had hoped >it would. I received no syntax error messages and 30 items were found, >yet the prices were not updated. Is there something I am missing in the >code? or am I doing something incorrectly?Yes, you are doing two thing incorrectly that I can see offhand. (1) The replace context has an extra ending brackets and an extraneous space after the word price, both of these characters should be removed. (2) The replace context fails to identify which record you want replaced, because you have not defined which record it should replace. Try writing your [replace] tag like this:[Replace db=catalogtest.db&sku=[sku]]price=[newPrice][/Replace]This assumes your catalogtest.db has a sku field as a unique record identifier. Sincerely, Ken Grome Kenneth Grome

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:

SSL and reg web* (1997) MacWEEK article help needed (1996) Upgrade to WebCat2 from Commerce Lite (1997) Problems with [Search] param - Mac Plugin b15 (1997) Frames (1997) [WebDNA] trouble with [url] encoding??? (2014) Date problems-more (1997) OFF TOPIC: help wanted (1997) WebDNA tags in WebMerchant email templates ... (1997) Speed Test (2007) Encyption mail was Suggestions for Topics ... (1998) Been meaning to ask... (1997) Help name our technology! I found it (1997) Search minus first found (1999) psst (1997) [CART] (1997) New commands in Final candidate (1997) Looking for PHP programmer (2007) Repeating Fields (1997) AOL and webcat (1998)