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:

All questions are welcome on this list (1997) Help name our technology! (1997) FYI-WebCat Mac or NT (1997) WebCat2: multiple currency support (1997) not interpreting Q (2001) [WebDNA] Can't see were it's wrong.... (2017) Spiders and Bots (2000) Extended [ConvertChars] (1997) Thanks Grant (1997) frames & carts (1997) WebDNA Solutions ... sorry! (1997) my price won't move (1997) Help! (1996) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) WebSTAR, OSX, WebDNA permissions problem ... (2005) Displaying Location (1997) WebCommerce: Folder organization ? (1997) WCS Newbie question (1997) Couple of questions (1999) Browser Info.txt -- newest additions? (1997)