Problems deleting when a search field is blank...

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 19050
interpreted = N
texte = Listers...Thanks for the suggestions the last time around with the ORDERFILE and LINEITEMS bit, although I still haven't solved the problems on that one. On to bigger and better problems however...An excerpt of the code is below, but here's the scenario. I'm making an Admin area to control an access database I'm using to protect an area of our site. Adding a new user works fine, searching for users (to make sure they're actually in there if they complain they can't get in, and automatically sending e-mails to them reminding them what their username, password, etc. are all work fine.However, when I do a search and notice that perhaps there is a double entry for someone, like USERNAME=PINK and PASSWORD=FLOYD, all I want to do is to delete ONLY ONE OF THEM. The case is usually that one entry has more info than the other, such as having an e-mail address in the field EMAIL.The primary problem... When I use the bit of code below, it looks like I've got it set to do this the right way, but since WebCatalog ignores blank fields, if I pass a blank field to the search OR delete context it ends up trying to delete BOTH of these records. How do I get around this? There is no completely unique value for any of the records in this database.A secondary problem... is that it doesn't delete the records for me with the code below... AT ALL. I don't know why it doesn't at all in this case, as I have other pages where I use the [delete] context with no problem.filename=virtual-ikms-admin.htm --- [showif [f.command]=c.results] [search db=/dbs/virtual-ikms-access.db&eqUSERNAMEdatarq=[f.Username]&eqPA SSWORDdatarq=[f.Password]] [founditems]
[/founditems] [/search] [/showif][showif [f.command]=c.delete][delete db=/dbs/virtual-ikms-access.db&eqUSERNAMEdatarq=[f.Username]&eqPAS SWORDdatarq=[f.Password]&eqEMAILdatarq=[f.Email]&eqCLIENTCODEdatarq=[f.Cli entCode]] [commitdatabase db=/dbs/virtual-ikms-access.db] [/showif] Associated Messages, from the most recent to the oldest:

    
  1. Re: Problems deleting when a search field is blank... (Kenneth Grome 1998)
  2. Re: Problems deleting when a search field is blank... (Peter Ostry 1998)
  3. Problems deleting when a search field is blank... (Dan Keldsen 1998)
Listers...Thanks for the suggestions the last time around with the ORDERFILE and LINEITEMS bit, although I still haven't solved the problems on that one. On to bigger and better problems however...An excerpt of the code is below, but here's the scenario. I'm making an Admin area to control an access database I'm using to protect an area of our site. Adding a new user works fine, searching for users (to make sure they're actually in there if they complain they can't get in, and automatically sending e-mails to them reminding them what their username, password, etc. are all work fine.However, when I do a search and notice that perhaps there is a double entry for someone, like USERNAME=PINK and PASSWORD=FLOYD, all I want to do is to delete ONLY ONE OF THEM. The case is usually that one entry has more info than the other, such as having an e-mail address in the field EMAIL.The primary problem... When I use the bit of code below, it looks like I've got it set to do this the right way, but since WebCatalog ignores blank fields, if I pass a blank field to the search OR delete context it ends up trying to delete BOTH of these records. How do I get around this? There is no completely unique value for any of the records in this database.A secondary problem... is that it doesn't delete the records for me with the code below... AT ALL. I don't know why it doesn't at all in this case, as I have other pages where I use the [delete] context with no problem.filename=virtual-ikms-admin.htm --- [showif [f.command]=c.results] [search db=/dbs/virtual-ikms-access.db&eqUSERNAMEdatarq=[f.Username]&eqPA SSWORDdatarq=[f.Password]] [founditems]
[username]> [password]>
[/founditems] [/search] [/showif][showif [f.command]=c.delete][delete db=/dbs/virtual-ikms-access.db&eqUSERNAMEdatarq=[f.Username]&eqPAS SWORDdatarq=[f.Password]&eqEMAILdatarq=[f.Email]&eqCLIENTCODEdatarq=[f.Cli entCode]] [commitdatabase db=/dbs/virtual-ikms-access.db] [/showif] Dan Keldsen

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:

nesting limits? (1998) [/application] error? (1997) Webcat no longer supported? (2006) More on the email templates (I like it) (1997) Problems with [Applescript] (1997) RE: Error reading data -1 (1997) Listserver problem (1997) Date Format not working (2004) WebCat2b15MacPlugIn - [authenticate] not [protect] (1997) Protect (1997) Passing radio check box value to itself... (2000) Part 2 - [showif] if variable exists (1998) Candle Light Vigil (2001) Need relative path explanation (1997) [shownext max=?] armed (1997) splitting numbers in webDNA? (1997) [Sum] function? (1997) WebCat2b15MacPlugin - showing [math] (1997) New Plug-in and Type 11 errors (1997) Applescript, WebDNA, and PDF (1997)