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 whileremoving 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 headerrow 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 thereare 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 PMTo: talk@webdna.usSubject: Re: [WebDNA] Reformatting database headersMichael 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 withouturling.However, I probably should have refrained from posting.. becauseI replied with answer that really isn't correct (out of not havingenough 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 BrookeWebDNA Software Corporationhttp://www.webdna.us**[Square Bracket Utopia]**---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usold archives: http://dev.webdna.us/TalkListArchive/
Associated Messages, from the most recent to the oldest:
Here is what I came up with....and it works![!]***Takes downloaded database and writes a separate header file whileremoving 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 headerrow 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 thereare 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 PMTo: talk@webdna.usSubject: Re: [WebDNA] Reformatting database headersMichael 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 withouturling.However, I probably should have refrained from posting.. becauseI replied with answer that really isn't correct (out of not havingenough 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 BrookeWebDNA Software Corporationhttp://www.webdna.us**[Square Bracket Utopia]**---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usold 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)