Re: [WebDNA] [append] does not add the newline char at the end of

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103346
interpreted = N
texte = John Butler wrote: >> John Butler wrote: >>> Version=6.1 >>> PLATFORM=unix-Linux Intel RedHat >>> I have a problem that is forcing me to think of creative workarounds >>> for today's code, but more than that is disturbing in general: >>> I have a perfectly normal and working [append] context.. but it is >>> not ending the record it appends with a newline char. I've seen >>> that before, but just decided to myself that it must be OK (even >>> though a faint voice said it was not supposed to be that way). Once >>> I append another record, then the previous record does get it's >>> delimiting newline char. >>> Well now I am doing a *simple* search on this db, and it finds any >>> specific one record I tell it to find, UNLESS I am trying to find >>> that last record with no newline char at the end. If I manually add >>> the newline char at the end, then the search works as expected. >>> Has anyone had any such experience? Suggestions? >> >> I'm a bit confused at what you are asking.. but >> I would definitely update your "6.1" version to "6.2". >> >> Not sure what release that is that you are using, because we >> didn't officially release a "6.1" version. >> >> Re: your append, maybe post some code?.. and maybe >> a more terse description of what is going on? >> >> Donovan > > This code: > > Version=[version] > PLATFORM=[PLATFORM] > > returns this: > Version=6.1 > PLATFORM=unix-Linux Intel RedHat > > I would LOVE to update the release, but this is on a shared host. I > will put in a request.. but the webdna man there is on honeymoon... so > it won't happen now. Meanwhile I have to produce for the client now. > > ---------------- > > this code: > > [Append > db=^dir/mydb.db]field1=123&field2=[url][val][/url]...&field24=none_yet[/Append] > > > successfully and accurately writes to mydb.db. It writes the new > record which I just asked it to. * BUT * this new record does NOT have > a newline char at the end... UNTIL / UNLESS I [append] another record. > > So what? Meaning, why would we care? > > I care because: I find that when I later search for that newly-appended > record with [search db=^dir/mydb.db&eqfield1datarq=123&max=1], then the > [search] will NOT find that record UNTIL / UNLESS I first add a newline > char at the end of the record. I can add that missing newline char > either manually, by directly editing the db, or else I have to [append] > another record so the previous one finally gets its newline char at the > end. > > How'd I do? Clear? Terse? :-) > > -G I'm not aware of any append bugs. I use them all the time, so not sure what to tell you. I would suggest to make sure the .db is solid with all the usuals, check for non-ASCII and control chars (zap gremlins in bbedit) and make sure the ending carriage return is there. Donovan -- Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [append] does not add the newline char at the end of the new record?! (which causes subsequent [search] to fail.) (Kenneth Grome 2009)
  2. [RESOLVED, I THINK] -- Re: [WebDNA] [append] does not add the newline char at the end of the new record?! (which can causes subsequent [search] to fail.) (John Butler 2009)
  3. Re: [WebDNA] [append] does not add the newline char at the end of (Donovan Brooke 2009)
  4. Re: [WebDNA] [append] does not add the newline char at the end of (Donovan Brooke 2009)
  5. Re: [WebDNA] [append] does not add the newline char at the end of the new record?! (which causes subsequent [search] to fail.) ("Brian Harrington, Broker" 2009)
  6. Re: [WebDNA] [append] does not add the newline char at the end of the new record?! (which can causes subsequent [search] to fail.) (Kenneth Grome 2009)
  7. Re: [WebDNA] [append] does not add the newline char at the end of the new record?! (which causes subsequent [search] to fail.) (Kenneth Grome 2009)
  8. Re: [WebDNA] [append] does not add the newline char at the end of the new record?! (which causes subsequent [search] to fail.) (christophe.billiottet@webdna.us 2009)
  9. Re: [WebDNA] [append] does not add the newline char at the end of the new record?! (which causes subsequent [search] to fail.) (John Butler 2009)
  10. Re: [WebDNA] [append] does not add the newline char at the end of the new record?! (which can causes subsequent [search] to fail.) (John Butler 2009)
  11. Re: [WebDNA] [append] does not add the newline char at the end of (Donovan Brooke 2009)
  12. Re: [WebDNA] [append] does not add the newline char at the end of the new record?! (which causes subsequent [search] to fail.) (Stuart Tremain 2009)
  13. Re: [WebDNA] [append] does not add the newline char at the end of the new record?! (which causes subsequent [search] to fail.) (John Butler 2009)
  14. Re: [WebDNA] [append] does not add the newline char at the end of (Donovan Brooke 2009)
  15. [WebDNA] [append] does not add the newline char at the end of the new record?! (which causes subsequent [search] to fail.) (John Butler 2009)
John Butler wrote: >> John Butler wrote: >>> Version=6.1 >>> PLATFORM=unix-Linux Intel RedHat >>> I have a problem that is forcing me to think of creative workarounds >>> for today's code, but more than that is disturbing in general: >>> I have a perfectly normal and working [append] context.. but it is >>> not ending the record it appends with a newline char. I've seen >>> that before, but just decided to myself that it must be OK (even >>> though a faint voice said it was not supposed to be that way). Once >>> I append another record, then the previous record does get it's >>> delimiting newline char. >>> Well now I am doing a *simple* search on this db, and it finds any >>> specific one record I tell it to find, UNLESS I am trying to find >>> that last record with no newline char at the end. If I manually add >>> the newline char at the end, then the search works as expected. >>> Has anyone had any such experience? Suggestions? >> >> I'm a bit confused at what you are asking.. but >> I would definitely update your "6.1" version to "6.2". >> >> Not sure what release that is that you are using, because we >> didn't officially release a "6.1" version. >> >> Re: your append, maybe post some code?.. and maybe >> a more terse description of what is going on? >> >> Donovan > > This code: > > Version=[version] > PLATFORM=[platform] > > returns this: > Version=6.1 > PLATFORM=unix-Linux Intel RedHat > > I would LOVE to update the release, but this is on a shared host. I > will put in a request.. but the webdna man there is on honeymoon... so > it won't happen now. Meanwhile I have to produce for the client now. > > ---------------- > > this code: > > [Append > db=^dir/mydb.db]field1=123&field2=[url][val][/url]...&field24=none_yet[/Append] > > > successfully and accurately writes to mydb.db. It writes the new > record which I just asked it to. * BUT * this new record does NOT have > a newline char at the end... UNTIL / UNLESS I [append] another record. > > So what? Meaning, why would we care? > > I care because: I find that when I later search for that newly-appended > record with [search db=^dir/mydb.db&eqfield1datarq=123&max=1], then the > [search] will NOT find that record UNTIL / UNLESS I first add a newline > char at the end of the record. I can add that missing newline char > either manually, by directly editing the db, or else I have to [append] > another record so the previous one finally gets its newline char at the > end. > > How'd I do? Clear? Terse? :-) > > -G I'm not aware of any append bugs. I use them all the time, so not sure what to tell you. I would suggest to make sure the .db is solid with all the usuals, check for non-ASCII and control chars (zap gremlins in bbedit) and make sure the ending carriage return is there. Donovan -- Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** Donovan Brooke

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:

Searching multiple fields from one form field (1997) Mac Programs (1998) Random Image (1998) Requiring that certain fields be completed (1997) Weird cart problem (webcat 2.x) (2000) WebCommerce Security Alert! (1996) serial number dishing (1997) Mac Vs WindowsNT (1997) Searching - FIELDNAMEtype=date FIELDNAMEtype=time (2004) Putting together a econimic server (2004) [WebDNA] An unknown error occured // Deadlock avoided (2011) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Tab Charactor (1997) The max=0 issue is a bug ... CALL TO ACTION (2000) Webmerch Error (1998) Merging databases (1997) RE: Can't get appendfile to work (1997) Upgrading to 10.1.5 (2002) Bug Report, maybe (1997) Change to 5.0 per website licensing (2003)