Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Flat File DB

  1. #1
    New to the CF scene
    Join Date
    Aug 2004
    Location
    Philadelphia, Pa
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Flat File DB

    Hey all,

    OK, so here's the deal. I want to create a flat file DB for a toy I'm working on. It will work like this:

    1) The user will select an ththemployee's name from the dropdown menu.
    2) When then name is selected, certain fields of information will change to reflect the new ththemployee name.

    We're talking about 250 approximate ththemployees. Each "row" in the DB will have the following:

    - name
    - office location
    - ththemail address
    - phone number
    - extension

    I could do it with a WHOLE BUNCH of arrays, but that would get insane. Anyone have any suggestions on the DB? I've never done this before, but I know my JS pretty well.

    - MT
    -=•=-=•=-=•=-=•=-=•=-=•=-=•=-=•=-=•=-
    Matt Torbin
    Center City Philadelphia Macintosh Users Group
    http://www.ccpmug.org/

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you could put is all as text in a tag and then with some predefined character combination split the text up into an array. but then you migth as well had put it in an array to begin with and save time not doing the split. and it would most likely be a pest to updated that tag mentioned earlier. Or you could put it all in a real db and then write it as an array when the file is called which makes it easy to update the db but mostlikely take up some more bandwidth than the previous mentioned idea.
    Or my 1st and last idea you could use an XML approach I am not completly sure as to how you incorporate js into an XML or the other way around but I am sure it can be done and if can't you can emulate xml storage using normal html tags like for instance the table,tr,td tags as a logical build up storage. just remember to hive those tags and then with java script fetch the names in the employer name column and the then when an employer name is selected in the drop down thing fetch the values from the table corresponding to the emplyoername.

    I am quite sure I haven't quite understood what you question actually was lol
    Last edited by Garadon; 08-25-2004 at 09:36 PM.

  • #3
    New to the CF scene
    Join Date
    Aug 2004
    Location
    Philadelphia, Pa
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What about Perl?

    Could this be done more easily with perl? Again, I want to stick with the flat file concept.

    - MT
    -=•=-=•=-=•=-=•=-=•=-=•=-=•=-=•=-=•=-
    Matt Torbin
    Center City Philadelphia Macintosh Users Group
    http://www.ccpmug.org/

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i did a computing project with an access database with javascript and an activex to access it. It depends on its use as activex requires consent, so an intranet or desktop use you could easily get away with.

    if you want to know let me know as i have a full documented project on it.

    it makes use of sql aswell.

    EDIT: the link for the section of code posted on here http://www.codingforums.com/showthread.php?t=31730

    If you need anymore help i would be able to assist you.

    scroots
    Last edited by scroots; 08-26-2004 at 12:14 AM.
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #5
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    With pure Javascript it would be ugly, but using Perl opens up some opportunity:
    http://www.databasejournal.com/sqlet...le.php/1428581

    Hope that helps,
    Sadiq.

  • #6
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if this is an IE-only project you could always use a Tabular Data Control (TDC). see this forum's sister site for more info: www.javascriptkit.com
    *keep it simple (TM)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •