Re: [WebDNA] Can WebDNA corrupt a db?

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 108041
interpreted = N
texte = aaronmichaelmusic@gmail.com wrote: [snip] If for example, you use a database that was from a windows source moved to a unix source or vice versa, then you can have a line-ending mismatch that will definitely cause corruption. No. The thing that is tricky, from what I've seen, is that you may not be aware of any corruption (line-ending mismatch) and the database will seem to work fine for a long time if all it contains is fairly straightforward strings and numbers. Then, all it may take to crash the db is adding a record that contains a line break inputed through a textarea. use, [input] when populating to your textareas, and [url][/url]'s when saving info and you won't have any corruption problems from your code. > If you use FTP for transferring files, be sure that your file encodings match with the server. Some FTP clients can automatically convert files (from up or down) to a particular encoding automatically. This may be. > I think because of the flat-file format, WebDNA dbs are quite vulnerable to corruption like any other text file. Every keystroke is recorded, so any inconsistency in character encodings or field delineation will corrupt it. Not exactly. > If you think a database file may be corrupt, you can replicate it and replace it with the newly created one, all via webdna. > > I've used something like this... > > [writefile yourDbCopy.db][listfields yourBrokenDb.db][hideif [index]=][/hideif][fieldname][/listfields] > [/writefile] > > [search db=yourBrokenDb.db&neXXdatarq=find_all][founditems] > [append db=yourDbCopy][listfields yourBrokenDb.db][hideif [index]=]&[/hideif][fieldname]=[interpret][[fieldname]][/interpret][/listfields][/append] > [/founditems][/search] > > [moveFile from= yourDbCopy.db&to=yourBrokenDb.db] > [flushdatabases] > > This will actually work well if your corrupted db is still readable. [url][/url] your values into WebDNA tables. > I typically create and administer all dbs from webdna itself. My rule is to never open a db in a text editor. Any time you do, you expose your db to risk. True.. but if you know what you are doing, editing in Excel, filemaker or a text editor etc. is fine. WebDNA can work with either Windows (0d0a) or *nix (0a) returns interchangeably, only on a [flushdatabases], WebDNA will write line endings to the particular type of environment being used. Corruption usually happens when not following the docs on how to interact correctly with the database with WebDNA code, or when you open up in a text editor and forget something like an ending CR (CRLF in windows ;-) ), or save using a different encoding. However, with a little knowledge, WebDNA tables are robust. it's just that the 'little knowledge' part may be fading on this list! ;-) Donovan -- Donovan Brooke Euca Design Center www.euca.us Associated Messages, from the most recent to the oldest:

    
  1. Re: [BULK] Re: [WebDNA] Can WebDNA corrupt a db? (Thierry Almy 2012)
  2. Re: [WebDNA] Can WebDNA corrupt a db? (Kenneth Grome 2012)
  3. Re: [WebDNA] Can WebDNA corrupt a db? (aaronmichaelmusic@gmail.com 2012)
  4. RE: [BULK] Re: [WebDNA] Can WebDNA corrupt a db? ("Terry Nair" 2012)
  5. RE: [BULK] Re: [WebDNA] Can WebDNA corrupt a db? ("Terry Nair" 2012)
  6. RE: [WebDNA] Can WebDNA corrupt a db? ("Michael A. DeLorenzo" 2012)
  7. Re: [WebDNA] Can WebDNA corrupt a db? (Steve Raslevich -Northern Sound 2012)
  8. Re: [BULK] Re: [WebDNA] Can WebDNA corrupt a db? (Kenneth Grome 2012)
  9. Re: [BULK] Re: [WebDNA] Can WebDNA corrupt a db? ("Terry Wilson" 2012)
  10. Re: [BULK] Re: [WebDNA] Can WebDNA corrupt a db? (Eddie Z 2012)
  11. Re: [BULK] Re: [WebDNA] Can WebDNA corrupt a db? (Eddie Z 2012)
  12. Re: [WebDNA] Can WebDNA corrupt a db? (Donovan Brooke 2012)
  13. Re: [WebDNA] Can WebDNA corrupt a db? (christophe.billiottet@webdna.us 2012)
  14. Re: [WebDNA] Can WebDNA corrupt a db? ("Terry Wilson" 2012)
  15. Re: [WebDNA] Can WebDNA corrupt a db? (Kenneth Grome 2012)
  16. Re: [WebDNA] Can WebDNA corrupt a db? (Kenneth Grome 2012)
  17. Re: [WebDNA] Can WebDNA corrupt a db? (aaronmichaelmusic@gmail.com 2012)
  18. Re: [WebDNA] Can WebDNA corrupt a db? (Terry Wilson 2012)
  19. Re: [BULK] Re: [WebDNA] Can WebDNA corrupt a db? (Donovan Brooke 2012)
  20. Re: [WebDNA] Can WebDNA corrupt a db? (Govinda 2012)
  21. [BULK] Re: [WebDNA] Can WebDNA corrupt a db? (Eddie Z 2012)
  22. Re: [WebDNA] Can WebDNA corrupt a db? (Donovan Brooke 2012)
  23. Re: [WebDNA] Can WebDNA corrupt a db? (aaronmichaelmusic@gmail.com 2012)
  24. [WebDNA] Can WebDNA corrupt a db? (Kenneth Grome 2012)
aaronmichaelmusic@gmail.com wrote: [snip] If for example, you use a database that was from a windows source moved to a unix source or vice versa, then you can have a line-ending mismatch that will definitely cause corruption. No. The thing that is tricky, from what I've seen, is that you may not be aware of any corruption (line-ending mismatch) and the database will seem to work fine for a long time if all it contains is fairly straightforward strings and numbers. Then, all it may take to crash the db is adding a record that contains a line break inputed through a textarea. use, [input] when populating to your textareas, and [url][/url]'s when saving info and you won't have any corruption problems from your code. > If you use FTP for transferring files, be sure that your file encodings match with the server. Some FTP clients can automatically convert files (from up or down) to a particular encoding automatically. This may be. > I think because of the flat-file format, WebDNA dbs are quite vulnerable to corruption like any other text file. Every keystroke is recorded, so any inconsistency in character encodings or field delineation will corrupt it. Not exactly. > If you think a database file may be corrupt, you can replicate it and replace it with the newly created one, all via webdna. > > I've used something like this... > > [writefile yourDbCopy.db][listfields yourBrokenDb.db][hideif [index]=][/hideif][fieldname][/listfields] > [/writefile] > > [search db=yourBrokenDb.db&neXXdatarq=find_all][founditems] > [append db=yourDbCopy][listfields yourBrokenDb.db][hideif [index]=]&[/hideif][fieldname]=[interpret][[fieldname]][/interpret][/listfields][/append] > [/founditems][/search] > > [moveFile from= yourDbCopy.db&to=yourBrokenDb.db] > [flushdatabases] > > This will actually work well if your corrupted db is still readable. [url][/url] your values into WebDNA tables. > I typically create and administer all dbs from webdna itself. My rule is to never open a db in a text editor. Any time you do, you expose your db to risk. True.. but if you know what you are doing, editing in Excel, filemaker or a text editor etc. is fine. WebDNA can work with either Windows (0d0a) or *nix (0a) returns interchangeably, only on a [flushdatabases], WebDNA will write line endings to the particular type of environment being used. Corruption usually happens when not following the docs on how to interact correctly with the database with WebDNA code, or when you open up in a text editor and forget something like an ending CR (CRLF in windows ;-) ), or save using a different encoding. However, with a little knowledge, WebDNA tables are robust. it's just that the 'little knowledge' part may be fading on this list! ;-) Donovan -- Donovan Brooke Euca Design Center www.euca.us 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:

[WebDNA] Best practice re: password storage (2013) 4.5 on Apache 2 (2005) WebCatalog and WebMerchant reviewed by InfoWorld (1997) Was 5.0 Pricing, now Sandbox versus Website and ruminating (2003) [WebDNA] Apache 2 Error Log Entry (2009) PSC recommends what date format yr 2000??? (1997) error (2000) Hideif on IP range (2004) PIXO support (1997) What am I missing (1997) Browser Reloads and AddlineItem (1997) is there a [purchase]? (1998) Make sure I understand this??? (1997) Refering page (1998) Grepping text variable tags (was: No subject given) (2000) Permissions Ignored - PLEASE HELP (2003) weird G3 happenings (1998) Online Docs? (1997) listfiles-looking for slick solution (1997) Re:2nd WebCatalog2 Feature Request (1996)