Re: Renaming DB fields

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 34747
interpreted = N
texte = Thanks, Joe. I was afraid I may need to take this approach. Thanks for the detailed explanation... a big help and much appreciated! Brian>>I have a database file that was exported from Excel in tab-delimited >>format. I want to be able to change the names of the fields and also add >>another field to those that exist already. Can I do this easily with a >>WebCat command/context? (I'm using WebCat 3.0.7, WebStar 4.2 and MacOS) > >We do something like this... If you can export the excel file without >the field names as tab separated separated values. Put you field >names in a .hdr file and in the same order that they appear in the >exported file. Tack your additional field onto the end of the .hdr >record and then it doesn't matter what the names of the fields are in >the excel database... you just have to have the order correct. > >Then upload the exported file to some known place on your site. We >use a folder named uploadeddatabases and our uploaded file is named >export.txt. > >Then do this: > >[closedatabase db=uploadeddatabases/export.txt] >[closedatabase db=members.db] > >[writefile members.db][include file=uploadeddatabases/export.txt][/writefile] > >This works well for a membership database that is actually maintained >by the client on a desktop computer. He uploads the desktop database >to the server from time to time. Note that if you put data in that >additional field you are talking about, this system will overwrite >that data. You'd have to make a more involved system to be able to >re-import from time to time and still maintain that additional data. >If that's important, you could put it in a second database and like >it by SKU or some other unique identifier.------------------------------------------------------------- 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: Renaming DB fields (Brian Wachter 2000)
  2. Re: Renaming DB fields (Joseph D'Andrea 2000)
  3. Renaming DB fields (Brian Wachter 2000)
Thanks, Joe. I was afraid I may need to take this approach. Thanks for the detailed explanation... a big help and much appreciated! Brian>>I have a database file that was exported from Excel in tab-delimited >>format. I want to be able to change the names of the fields and also add >>another field to those that exist already. Can I do this easily with a >>WebCat command/context? (I'm using WebCat 3.0.7, WebStar 4.2 and MacOS) > >We do something like this... If you can export the excel file without >the field names as tab separated separated values. Put you field >names in a .hdr file and in the same order that they appear in the >exported file. Tack your additional field onto the end of the .hdr >record and then it doesn't matter what the names of the fields are in >the excel database... you just have to have the order correct. > >Then upload the exported file to some known place on your site. We >use a folder named uploadeddatabases and our uploaded file is named >export.txt. > >Then do this: > >[closedatabase db=uploadeddatabases/export.txt] >[closedatabase db=members.db] > >[writefile members.db][include file=uploadeddatabases/export.txt][/writefile] > >This works well for a membership database that is actually maintained >by the client on a desktop computer. He uploads the desktop database >to the server from time to time. Note that if you put data in that >additional field you are talking about, this system will overwrite >that data. You'd have to make a more involved system to be able to >re-import from time to time and still maintain that additional data. >If that's important, you could put it in a second database and like >it by SKU or some other unique identifier.------------------------------------------------------------- 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/ Brian Wachter

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:

Navigator 4.01 (1997) WC2b12: Yes, Formulas.db is for real (1997) Search context not finding recent entries (1998) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) Close Databases Crash? (1998) The evolved Server Configuration Queston (2000) Stat analyzer (1997) WC2b15 - [HTMLx]...[/HTMLx] problems (1997) carriage returns in data (1997) Help! WebCat2 bug (1997) [Sum] function? (1997) RAM variables (1997) RE: WebCat and image maps (1997) Grep to convert characters to html entities (2006) WebCatalog can't find database (1997) For those of you not on the WebCatalog Beta... (1997) WebCatalog Upgrade Pricing? (1997) WC 2.0 frames feature (1997) Multiple catalog databases and showcart (1997) New iMac, now ... how do I make webdna serve .html files? (2005)