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 andLINEITEMS bit, although I still haven't solved the problems on that one. Onto bigger and better problems however...An excerpt of the code is below, but here's the scenario. I'm making anAdmin area to control an access database I'm using to protect an area ofour site. Adding a new user works fine, searching for users (to make surethey're actually in there if they complain they can't get in, andautomatically 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 doubleentry for someone, like USERNAME=PINK and PASSWORD=FLOYD, all I want to do isto delete ONLY ONE OF THEM. The case is usually that one entry has moreinfo 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 dothis the right way, but since WebCatalog ignores blank fields, if I pass ablank field to the search OR delete context it ends up trying to delete BOTHof these records. How do I get around this? There is no completely uniquevalue 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... ATALL. I don't know why it doesn't at all in this case, as I have other pageswhere 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]&eqPASSWORDdatarq=[f.Password]] [founditems]
[/founditems] [/search][/showif][showif [f.command]=c.delete][delete db=/dbs/virtual-ikms-access.db&eqUSERNAMEdatarq=[f.Username]&eqPASSWORDdatarq=[f.Password]&eqEMAILdatarq=[f.Email]&eqCLIENTCODEdatarq=[f.ClientCode]] [commitdatabase db=/dbs/virtual-ikms-access.db][/showif]
Associated Messages, from the most recent to the oldest:
Listers...Thanks for the suggestions the last time around with the ORDERFILE andLINEITEMS bit, although I still haven't solved the problems on that one. Onto bigger and better problems however...An excerpt of the code is below, but here's the scenario. I'm making anAdmin area to control an access database I'm using to protect an area ofour site. Adding a new user works fine, searching for users (to make surethey're actually in there if they complain they can't get in, andautomatically 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 doubleentry for someone, like USERNAME=PINK and PASSWORD=FLOYD, all I want to do isto delete ONLY ONE OF THEM. The case is usually that one entry has moreinfo 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 dothis the right way, but since WebCatalog ignores blank fields, if I pass ablank field to the search OR delete context it ends up trying to delete BOTHof these records. How do I get around this? There is no completely uniquevalue 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... ATALL. I don't know why it doesn't at all in this case, as I have other pageswhere 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]&eqPASSWORDdatarq=[f.Password]]
[founditems] [/founditems] [/search][/showif][showif [f.command]=c.delete][delete db=/dbs/virtual-ikms-access.db&eqUSERNAMEdatarq=[f.Username]&eqPASSWORDdatarq=[f.Password]&eqEMAILdatarq=[f.Email]&eqCLIENTCODEdatarq=[f.ClientCode]] [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)