Universal db access template ...

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 45037
interpreted = N
texte = [!]HAS_WEBDNA_TAGS[/!][grep search=%0D&replace=][!]This is a universal database access template (or at least that's what it's supposed to be).I created this template so I could browse/sort and edit/delete any record in any db file I create -- without having to build a custom template each time. Just copy and paste everything you see here into a blank text file, then read these instructions BEFORE you use it ...The first rule for success with this file is to name it the same as the db you want to access -- except with the .tpl suffix instead of the .db suffix -- then place it into the same folder as the database file. The second rule is that the FIRST FIELD in the db must be the unique record identifier field. If you have a db that does not use the first field as its unique record identifier, this file won't work for you.The third rule is that you should change the text variables for YourUsername and YourPassword to your own values.Please note, there is a problem when displaying encrypted values from a db file. Sometimes the field following the encrypted value will include the data from (what appears to be) the next record in the search results. Until this problem is fixed, you'll probably screw up your data if you're not careful to check every field in the update form before you click the update button. This might not be a problem if you have double-URLed your encrypted values before appending or replacing them in the db, but I'm not sure about this theory, and I haven't had time to debug the problem, so if anyone knows the proper solution please post it on the talk list ... along with any other problems you find in this code.Thanks![/!][text]fileUser=YourUsername[/text] [text]filePass=YourPassword[/text][listwords words=[thisurl]&delimiters=/][text secure=T]thisPage=[word][/text][/listwords] [text]thisDB=[middle endbefore=.][thispage][/middle].db[/text] [text]skuField=[listfields db=[thisDB]][showif [index]=1][fieldname][/showif][/listfields][/text] [text secure=f]sortBy=[skuField][/text] [text secure=f]task=[/text][showif [fileUser]![username]][authenticate Access to [thisDB]][/showif] [showif [filePass]![password]][authenticate Access to [thisDB]][/showif][showif [task]=update] [replace db=[thisDB]&eq[skuField]datarq=[url][skuValueOld][/url]][listfields db=[thisDB]][fieldname]=[url][interpret][[fieldname]][/interpret][/url]&[/listfields][/replace] [redirect [thispage]?sortby=[sortBy]&howMany=[howMany]&startat=[startat]] [/showif][showif [task]=delete] [delete db=[thisDB]&eq[skuField]datarq=[url][skuValue][/url]] [redirect [thispage]?sortby=[sortBy]&howMany=[howMany]&startat=[startat]] [/showif][showif [task]=] [text secure=f]howMany=20[/text] [search db=[thisDB]&ne[skuField]datarq=[blank]&as[sortBy]sort=1&max=[howMany]&startat=[startat]]
[numfound] records found.   (Show[showif [howMany]=20] 20 [/showif][hideif [howMany]=20]  20 [/hideif][showif [howMany]=50] 50 [/showif][hideif [howMany]=50]  50 [/hideif][showif [howMany]=100] 100 [/showif][hideif [howMany]=100]  100 [/hideif][showif [howMany]=200] 200 [/showif][hideif [howMany]=200]  200 [/hideif][showif [howMany]=500] 500 [/showif][hideif [howMany]=500]  500 [/hideif][showif [howMany]=5000] all [/showif][hideif [howMany]=5000]  all [/hideif]  per page)


[listfields db=[thisDB]] [/listfields][founditems] [listfields db=[thisDB]] [showif [index]=1] [/showif] [showif [index]!1] [/showif] [text]numFields=[index][/text] [/listfields][/founditems][showif [numfound]>[howMany]] [/showif]
#[fieldname]
[index]edit[interpret][[fieldname]][/interpret]

Show Page:   [shownext position=begin] [math]ceil([end]/[howMany])[/math]  [/shownext] [shownext position=middle] [math]ceil([end]/[howMany])[/math]  [/shownext] [shownext position=end] [math]ceil([end]/[howMany])[/math]  [/shownext]
[/search] [/showif] [showif [task]=edit] [search db=[thisDB]&eq[skuField]datarq=[interpret][[skuField]][/interpret]&max=1] [founditems]
[listfields db=[thisDB]] [!][/!] [fieldname]
[/listfields]

[/founditems] [/search] [/showif][/grep]------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Universal db access template ... (Kenneth Grome 2002)
  2. Re: Universal db access template ... (Kenneth Grome 2002)
  3. Re: Universal db access template ... (Kenneth Grome 2002)
  4. Re: Universal db access template ... (Alain Russell 2002)
  5. Re: Universal db access template ... (Alain Russell 2002)
  6. Re: Universal db access template ... (Gary Krockover 2002)
  7. Re: Universal db access template ... (Joe D'Andrea 2002)
  8. Re: Universal db access template ... (Gary Krockover 2002)
  9. Re: Universal db access template ... (Kenneth Grome 2002)
  10. Re: Universal db access template ... (Gary Krockover 2002)
  11. Re: Universal db access template ... (Kenneth Grome 2002)
  12. Universal db access template ... (Kenneth Grome 2002)
[!]HAS_WEBDNA_TAGS[/!][grep search=%0D&replace=][!]This is a universal database access template (or at least that's what it's supposed to be).I created this template so I could browse/sort and edit/delete any record in any db file I create -- without having to build a custom template each time. Just copy and paste everything you see here into a blank text file, then read these instructions BEFORE you use it ...The first rule for success with this file is to name it the same as the db you want to access -- except with the .tpl suffix instead of the .db suffix -- then place it into the same folder as the database file. The second rule is that the FIRST FIELD in the db must be the unique record identifier field. If you have a db that does not use the first field as its unique record identifier, this file won't work for you.The third rule is that you should change the text variables for YourUsername and YourPassword to your own values.Please note, there is a problem when displaying encrypted values from a db file. Sometimes the field following the encrypted value will include the data from (what appears to be) the next record in the search results. Until this problem is fixed, you'll probably screw up your data if you're not careful to check every field in the update form before you click the update button. This might not be a problem if you have double-URLed your encrypted values before appending or replacing them in the db, but I'm not sure about this theory, and I haven't had time to debug the problem, so if anyone knows the proper solution please post it on the Talk List ... along with any other problems you find in this code.Thanks![/!][text]fileUser=YourUsername[/text] [text]filePass=YourPassword[/text][listwords words=[thisurl]&delimiters=/][text secure=T]thisPage=[word][/text][/listwords] [text]thisDB=[middle endbefore=.][thispage][/middle].db[/text] [text]skuField=[listfields db=[thisDB]][showif [index]=1][fieldname][/showif][/listfields][/text] [text secure=f]sortBy=[skuField][/text] [text secure=f]task=[/text][showif [fileUser]![username]][authenticate Access to [thisDB]][/showif] [showif [filePass]![password]][authenticate Access to [thisDB]][/showif][showif [task]=update] [replace db=[thisDB]&eq[skuField]datarq=[url][skuValueOld][/url]][listfields db=[thisDB]][fieldname]=[url][interpret][[fieldname]][/interpret][/url]&[/listfields][/replace] [redirect [thispage]?sortby=[sortBy]&howMany=[howMany]&startat=[startat]] [/showif][showif [task]=delete] [delete db=[thisDB]&eq[skuField]datarq=[url][skuValue][/url]] [redirect [thispage]?sortby=[sortBy]&howMany=[howMany]&startat=[startat]] [/showif][showif [task]=] [text secure=f]howMany=20[/text] [search db=[thisDB]&ne[skuField]datarq=[blank]&as[sortBy]sort=1&max=[howMany]&startat=[startat]]
[numfound] records found.   (Show[showif [howMany]=20] 20 [/showif][hideif [howMany]=20]  20 [/hideif][showif [howMany]=50] 50 [/showif][hideif [howMany]=50]  50 [/hideif][showif [howMany]=100] 100 [/showif][hideif [howMany]=100]  100 [/hideif][showif [howMany]=200] 200 [/showif][hideif [howMany]=200]  200 [/hideif][showif [howMany]=500] 500 [/showif][hideif [howMany]=500]  500 [/hideif][showif [howMany]=5000] all [/showif][hideif [howMany]=5000]  all [/hideif]  per page)


[listfields db=[thisDB]] [/listfields][founditems] [listfields db=[thisDB]] [showif [index]=1] [/showif] [showif [index]!1] [/showif] [text]numFields=[index][/text] [/listfields][/founditems][showif [numfound]>[howMany]] [/showif]
#[fieldname]
[index][interpret][[fieldname]][/interpret]&sortBy=[sortBy]&howMany=[howMany]&startat=[startat]>edit[interpret][[fieldname]][/interpret]
[math][numFields]+1[/math]>
Show Page:   [shownext position=begin] [math]ceil([end]/[howMany])[/math]  [/shownext] [shownext position=middle] [math]ceil([end]/[howMany])[/math]  [/shownext] [shownext position=end] [math]ceil([end]/[howMany])[/math]  [/shownext]
[/search] [/showif] [showif [task]=edit] [search db=[thisDB]&eq[skuField]datarq=[interpret][[skuField]][/interpret]&max=1] [founditems]
[interpret][[skuField]][/interpret]> [listfields db=[thisDB]] [!][input][interpret][[fieldname]][/interpret][/input]>[/!] [fieldname]
[/listfields] [interpret][[skuField]][/interpret]>

[/founditems] [/search] [/showif][/grep]------------------------------------------------------------- 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://search.smithmicro.com/ 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:

convert characters (2003) Help name our technology! (1997) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) Questions on Mac WC 3.0.5b13 (2000) Cart sweeper (2000) [countWords]? (1997) Practice runs ? (1997) [LOOKUP] (1997) Pithy questions on webcommerce & siteedit (1997) Max Record length restated as maybe bug (1997) Spell Check (2000) OT - How to pay commissions to non US affiliates? (2000) Nested tags count question (1997) Re:2nd WebCatalog2 Feature Request (1996) Replace context problem ... and answers (1997) [WebDNA] v7 success story (2012) Formating found categories (1997) Formulas.db + Users.db (1997) taxTotal, too (1997) no global [username] or [password] displayed ... (1997)