RE: [WebDNA] Reformatting database headers

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 102515
interpreted = N
texte = Here is what I came up with....and it works! [!]***Takes downloaded database and writes a separate header file while removing any spaces in header names[/!] [writefile sasjcmls_res.hdr][ListFields sasjcmls_res.db][grep search=[url] [/url]&replace=][FieldName][/grep][/ListFields][/writefile] [!]***Waits for new header file to be created and then deletes old header row in database using old unique field name[/!] [WaitForFile file=sasjcmls_res.hdr] [delete db=sasjcmls_res.db&eqMLSNumberdata=MLS Number] [/WaitForFile] I still have headers with odd characters in them. Does anyone know if there are illegal characters we should not be using in our header names? Thanks for your help Donovan and Dan. Michael -----Original Message----- From: Donovan Brooke [mailto:dbrooke@webdna.us] Sent: Saturday, May 02, 2009 2:18 PM To: talk@webdna.us Subject: Re: [WebDNA] Reformatting database headers Michael A. DeLorenzo wrote: > My text editor does not allow me to find the ASCII table of a carriage > return. When I [URL] a return I get %1A but that did not work in the code > either. My text editor is saving the files in unix format if that helps. > > Michael %0D should work.. (that is %D).. however, you may have to try with and without urling. However, I probably should have refrained from posting.. because I replied with answer that really isn't correct (out of not having enough time to really think about your issue).. sorry. I still don't have enough time.. however, my code that I posted, when the syntax is corrected, is still not going to work! :-/ This may be closer.. but again, I'm typing fast and this is untested: -- [writefile file=newdb.hdr][grep search=[url] [/url]&replace=|][middle startafter=&endbefore=[/unurl]%0D[/unurl]][include file=olddb.db&raw=T][/middle][/grep][/writefile] [writefile file=newdb.db][middle startafter=[/unurl]%0D[/unurl]&endbefore=][include file=olddb.db&raw=T][/middle][/writefile] [movefile from=olddb.db&to=archives/olddb.db.bu] -- The old code would, when working, would spit out just the header.. the later code, creates a .hdr file and matching .db file (when working). Hope that helps. Donovan -- Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us old archives: http://dev.webdna.us/TalkListArchive/ Associated Messages, from the most recent to the oldest:

    
  1. RE: [WebDNA] Reformatting database headers ("Michael A. DeLorenzo" 2009)
  2. Re: [WebDNA] Reformatting database headers ("Dan Strong" 2009)
  3. Re: [WebDNA] Reformatting database headers (Donovan Brooke 2009)
  4. RE: [WebDNA] Reformatting database headers ("Michael A. DeLorenzo" 2009)
  5. Re: [WebDNA] Reformatting database headers (Donovan Brooke 2009)
  6. RE: [WebDNA] Reformatting database headers ("Michael A. DeLorenzo" 2009)
  7. RE: [WebDNA] Reformatting database headers ("Michael A. DeLorenzo" 2009)
  8. RE: [WebDNA] Reformatting database headers ("Michael A. DeLorenzo" 2009)
  9. Re: [WebDNA] Reformatting database headers (Donovan Brooke 2009)
  10. Re: [WebDNA] Reformatting database headers (Donovan Brooke 2009)
  11. Re: [WebDNA] Reformatting database headers ("Dan Strong" 2009)
Here is what I came up with....and it works! [!]***Takes downloaded database and writes a separate header file while removing any spaces in header names[/!] [writefile sasjcmls_res.hdr][ListFields sasjcmls_res.db][grep search=[url] [/url]&replace=][FieldName][/grep][/ListFields][/writefile] [!]***Waits for new header file to be created and then deletes old header row in database using old unique field name[/!] [WaitForFile file=sasjcmls_res.hdr] [delete db=sasjcmls_res.db&eqMLSNumberdata=MLS Number] [/WaitForFile] I still have headers with odd characters in them. Does anyone know if there are illegal characters we should not be using in our header names? Thanks for your help Donovan and Dan. Michael -----Original Message----- From: Donovan Brooke [mailto:dbrooke@webdna.us] Sent: Saturday, May 02, 2009 2:18 PM To: talk@webdna.us Subject: Re: [WebDNA] Reformatting database headers Michael A. DeLorenzo wrote: > My text editor does not allow me to find the ASCII table of a carriage > return. When I [url] a return I get %1A but that did not work in the code > either. My text editor is saving the files in unix format if that helps. > > Michael %0D should work.. (that is %D).. however, you may have to try with and without urling. However, I probably should have refrained from posting.. because I replied with answer that really isn't correct (out of not having enough time to really think about your issue).. sorry. I still don't have enough time.. however, my code that I posted, when the syntax is corrected, is still not going to work! :-/ This may be closer.. but again, I'm typing fast and this is untested: -- [writefile file=newdb.hdr][grep search=[url] [/url]&replace=|][middle startafter=&endbefore=[/unurl]%0D[/unurl]][include file=olddb.db&raw=T][/middle][/grep][/writefile] [writefile file=newdb.db][middle startafter=[/unurl]%0D[/unurl]&endbefore=][include file=olddb.db&raw=T][/middle][/writefile] [movefile from=olddb.db&to=archives/olddb.db.bu] -- The old code would, when working, would spit out just the header.. the later code, creates a .hdr file and matching .db file (when working). Hope that helps. Donovan -- Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us old archives: http://dev.webdna.us/TalkListArchive/ "Michael A. DeLorenzo"

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:

Search wbrk (repost) (2001) Running _every_ page through WebCat-error.html (1997) [WebDNA] agree? --> also broken when we compare against something with a "!" in it. (2009) REPOST... Incompatibility with WebCat 3 templates ... (2000) 2.1b3 --> way slow (1997) [WriteFile] problems (1997) WebCatalog NT beta 18 problem (1997) Verifying both name and password (was: THANKS) (1997) show all problem (1997) NT considerations (1997) Strange ThisURL under Linux (2000) WebCatalog 4.0 Users that want to talk to the Media.... (2000) Optional new-style syntax for WebCatalog 4.0 (2000) Major Security Hole (1998) Variable prices and Formulas.db (1997) company names not begin with a letter (2005) expired beta (1997) Template Cache problem -- new plugin for ya' (2000) WebDNA Challenge - Was: Why WebDNA is not popular (2002) Automatic thumbnail images (1998)