Changed Foxpro 2.6 .dbf file and change doesn’t show up when I run the .exe

135 pts.
Tags:
Database Files
FoxPro
FoxPro 2.6
FoxPro 2.6 for DOS
FoxPro for DOS
Hi, I am hoping I am posting this in the correct forum. I work for a company that is running a simple tickets database program to track who uses what sports tickets. There is a .exe file and a few .dbf files, etc. About 10 files in a folder to run this Tickets program from Dos FoxPro 2.6 version. in the tickets.dbf file is where I see our ticket numbers listed. Someone from years back from this foxpro program we run and I am not a programmer at all, but I thought it I went in and changed the tickets.dbf file, when I ran the ticket.exe program that the updated seats in the tickets.dbf file would be updated in the dos program. Which is not the case. Since all of the seat numbers changed that we are assigned, how can I change the seats in ticket.dbf so when I run tickets.exe the new seat assignments show up??? I don't know what I am missing? Can anyone help me.. I would appreciate any assistance anyone can provide. I am almost thinking I have to compile something because just changing the .dbf file in Foxpro does not bring up the new seats when I run the dos Foxpro program... Thank you so much!!

Answer Wiki

Thanks. We'll let you know when a new response is added.

I think u made a mistake to open the .dbf file. In this dir, there is a .bak file in the same name, just change the name from .bak to .dbf of the same file and before doing that copy the all .dbf files in a safe place.

Hope u will gain….

Discuss This Question: 27  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    Rechil, why do you think he/she made a mistake opening the dbf file ? Djr6004, don't rename the bak file unless you are completely sure it is updated to the point before you manually updated the database. You could lost important data if you do that and the bak file is outdated. Most likely the problem is that you didn't modify all of the appropriate tables. You need to know how all of these tables relate to each other, and how exactly the program updates the database. If you don't know the internals of the application then it is not recommended that you manually modify the database.
    70,180 pointsBadges:
    report
  • Djr6004
    Hi Rechil and Carlosdl, I truly appreciate both of you taking the time to review my question and your responses, I really do... I am a Server Admin for 15+ years with Microsoft and Citrix technologies, so Foxpro I am not that familar with... 3 yrs ago I replaced our IT person here in our office. Just to give you a little more detail because there is no .bak file that I see; every year we buy tickets for say the steelers. All I was instructed to do was every year when the new tickets come out, just copy the entire folder over to the new year. manually go into the .exe program which brings up all of the past year tickets and manually delete the client names and change the dates of the tickets and who our team is playing. That is it, so since i have been there even looking back the past few years, I've never seen any .bak files in the folder. I am looking at the folder right now that has the program called steelers.exe in and I see the .exe, 4 .dbf files (steelers.dbf, tickets.dbf, foxuser.dbf, company.dbf) - 1 foxuser.fpt file, 1 steelers.fxp file, 1 steelers.err file and the 1 control file steelers.cdx (which I know I can delete and it will be recreated). That is all there is, no .bak file. the tickets.dbf file is the file I changed from within Foxpro Dos 2.6. I figured with changing this file and saving the file, I should have been good to go and that wasn't the case. Does this help? Thank you so much!!!
    135 pointsBadges:
    report
  • Djr6004
    I did find an older sub-folder under a main Foxpro26 folder. Shows a lot more files including .prg, .scx, .pjx, .pjt and additional files. Do I need to recompile this somehow or update the tickets.dbf file in this folder after I make a copy of everything first? Keeping in mind I am not a developer, it almost seems like the tickets.dbf was updated, but when I run the .exe file, running the team.exe file doesn't pick up the changes in the tickets.dbf file. So I am thinking perhaps I need to compile or recompile my changes or? Sorry, thank you so much!!
    135 pointsBadges:
    report
  • carlosdl
    I have not used Foxpro for more than a decade, so I don't think I will be able to provide more help. However, I can tell you that you should not need to recompile anything in order to make the program pick up the database changes. As I mentioned before, if you don't know how the program updates the database, it is not a good idea to modify it manually. Among other things, you could be updating a file that is not the one that the program uses, or you could be missing some other updates needed in other tables to keep data integrity.
    70,180 pointsBadges:
    report
  • Djr6004
    Carlosdl, Thanks and I truly understand.. Let me ask you though; when you mentioned about updating the db manually; I did go into Foxpro and browse to open the .dbf file and I made the seat number changes there, then I just close the .dbf file. Is that what you mean by modifying it manually, that I shouldn't have done? thanks and I am asking simply out of curiosity because I don't know how else I would have done it.. thanks!
    135 pointsBadges:
    report
  • carlosdl
    Yes, I call it a 'manual modification' because you didn't use the .exe program to update the database. Modifying the data manually could be Ok if you do it exactly as the program would have done it. I have been assuming that the program offers some way to modify the data, but you decided to update it manually because you thought it was a faster way to get the same results (or for some other reason). If that's not the case, then there is no other option than doing it manually, but you have to know where exactly you need to update the data. Maybe you need to update more than one file/table, for example.
    70,180 pointsBadges:
    report
  • Djr6004
    HI Carlosdl, I understand. Best way I can explain it and I can send you a screen shot when I run the .exe file, the ticket (seats) are listed on the far left in the Dos windows. You can only input the client name and company name fields (which are to the right of the tickets (seats) listed. When you run this .exe program that the previous IT person put together, you can not edit the actual seat numbers while in the actual penguins.exe program, only the client name and company name fields can be updated with text (that you can type in those fields). Does that make sense? I just ran a test and input test client name and test company information. Looks like the only .dbf file that gets updated is the penguins.dbf file, nothing else. So I thought when you ran the penguins.exe file, that file would read all of the .dbf files including the one 1 changed with the seat assignment numbers, that is the tickets.dbf file. tickets program hopefully this screen shot comes out okay for you to see. The top 4 seats under Ticket is what I changed in the .dbf file that does not show as updated here. Thanks and hopefully this helps someone.. Appreciate every ones time on helping me with this!!
    135 pointsBadges:
    report
  • carlosdl
    Hi Djr6004. Without knowing how the data is stored in the different files, we have no way to know how to modify it correctly. Maybe the seat numbers are stored in some other files in addition to tickets.dbf, and you need to update it there too. I would open all other dbf files to see if the seats numbers are there.
    70,180 pointsBadges:
    report
  • Arazzaq2001k
    How download foxprog distrubution kit please give me web address Thanks
    10 pointsBadges:
    report
  • Djr6004
    Carlosdl, sorry for the delay. I didn't realize there were updates to my post.. I will check the other .dbf files as well and let you know. I am 90% certain I already checked the other .dbf files. I will check today and post what I discover. Thanks!
    135 pointsBadges:
    report
  • Djr6004
    Arazzaq2001k | Oct 1, 2010 9:38 AM (GMT) How download foxprog distrubution kit please give me web address. Thanks I apologize I am not entirely sure what you are asking here? If you are asking me where to download this distribution kit, sorry I have no idea!
    135 pointsBadges:
    report
  • Djr6004
    Hi Carlosdl, Sorry to bother you again.. I looked at the 4 .dbf files and only see the seats in the tickets.dbf file, none of the other .dbf files show the seats. When I browse to the tickets.dbf file and open this up, I see the seats listed that I changed. A test I did was to completely remove the tickets.dbf file from the folder that I run the .exe from and the program runs, without an issue. When I bring up the program, there are still tickets (seats) listed in the program even though I took out the tickets.dbf file. How does that make sense? Does this make sense to you? Again I am not a programmer, however I work in the Wintel Sys Admin side for 14 yrs, so technology isn't new to me... Any thoughts? Thanks!
    135 pointsBadges:
    report
  • carlosdl
    Hi Djr6004. Yes, that makes sense, and that was one of the possibilities I mentioned before (on Sep 22). The program is accessing some other dbf file that is not the one in that directory. I'm not sure if this will work, but you can try copying the .exe program (only the .exe) to another machine and try to run it. It will fail, and maybe it will tell you the path where it is looking for the .dbf file. If so, you can then go to your pc and modify the appropriate dbf file. Another option could be searching for all dbf files in your machine, and rename them one at a time, until you find which is the one that makes the program fail. Let us know the results of your tests. It seems that we are getting closer.
    70,180 pointsBadges:
    report
  • Djr6004
    Hi Carlos, wow I just lost everything I already typed once to insert an image.. sorry!! Okay so I did move the penguins.exe program to another computer and I do get prompted "Please locate the PENGUINS database" where I can change the Drive, Directory and a list of file, etc... So what I did was open the Penguins.dbf file that was in that directory when the penguins.exe was running there. I opened Penguins.dbf from within Foxpro and selected "Database, then selected Setup" here is what I see... I still do not see anywhere that the seats are listed. Penguins dbf file
    135 pointsBadges:
    report
  • Djr6004
    If I do a BROWSE from within Foxpro, here is what I see. I am assuming one is like the design mode so to speak, browse mode is to where you can actually update information, etc... So what I am missing or do I need to add one .dbf file at a time? Thanks so much for your time Carlos and patience!Penguins browse
    135 pointsBadges:
    report
  • carlosdl
    Hi Djr6004. Sorry for the delay. What happened to the exe program when you selected that dbf ? did it run ?
    70,180 pointsBadges:
    report
  • Djr6004
    Hi Carlos, I didn't want to go any further until I heard from you, just in case you were looking for me to do anything else. So now moved the penguins.dbf file to the same computer. Ran penguins.exe, then selected the penguins.dbf file AFTER I started the .exe, I copied penguins.dbf to that computer. Now I get message; 'File 'company' does not exist. See your System Administrator Program = SETUP Line no. 63 ... thanks again Carlos!
    135 pointsBadges:
    report
  • carlosdl
    You have a company.dbf file in the original program location, right ? Copy it to the new location and run the program again. Repeat this step for any other file that the program reports as missing, but do it one at a time to make sure you only add files that are causing the program to fail.
    70,180 pointsBadges:
    report
  • Djr6004
    Carlos, You are correct. 1. I have 2 files currently; penguins.exe, then added penguins.dbf. 2. I copy over company.dbf. 3. 3 files in the directory, I run penguins.exe and the program runs, no messages now. 4. When I look at the seats listed in the program, the same old numbers exist. No new seat numbers are visible, only the old seat numbers. 5. I run fox.exe from Dos because I want to look at the penguins.dbf and company.dbf files once again. a. from within Foxpro in Dos, I go to Database, select Setup and review penguins.dbf. Also do database browse and I do not see anywhere the seats are listed. b. I go into company.dbf file and can't see the seats listed anywhere. 6. The ONLY .dbf file I edited was the tickets.dbf file, I never copied over this file yet.. I've only copied over 3 files; penguins.exe, penguins.dbf, company.dbf 7. When I run penguins.exe the program works with no messages, shows all of the old seat numbers. 8. So where are the seat numbers stored then? From browsing the 2 dbf files, neither dbf file shows the seat numbers, period. 9. Because I am not a programmer, this is probably the dumbest question; Can Foxpro be used to create the penguins.exe program? If so, is it possible that the seat numbers are within the program then? Can I get into this .exe file through Foxpro, or does it not work that way? Carlos sorry and I can imagine you have tons of work to do.. I really appreciate your time immensely and can't figure out where else to go or what I am missing. Its also like the seats have to be in the program, however how do I get into the .exe or recompile the .exe or?
    135 pointsBadges:
    report
  • carlosdl
    That's odd. Could the seat numbers be hardcoded in the program ? Yes, that is a possibility, but it is a very bad practice and I wouldn't expect that to be the case. The only way to be sure would be looking at the program's source code, but you would have to have some basic programming knowledge. Can the exe file be created from Foxpro ? Yes, if you have the source code, which, if I remember well, would be a .prg file. However, I don't remember how to compile it in forxpro. Maybe you can find something on the web.
    70,180 pointsBadges:
    report
  • Djr6004
    Hi Carlos, I think based on the wealth of assistance, direction and guidance and the process of elimination, perhaps the seat numbers are hard coded. Since the IT person that created this program was with our company for over 20+ years and program, I am thinking anything is possible. Working in IT myself for over 13 years, I know not everyone thinks alike and some times some people just take different paths for whatever reasons. Definitely something I couldn't answer or put my finger on as you can imagine.. I know there are .prg files here and I appreciate you answering my questions about creating the .exe and source code, so I am a lot further ahead thanks to your assistance. I can't thank you enough!! I'll use my favorite tool, Google and see what I can come up with regarding editing and compiling source code, etc.. I am always up for a new IT challenge and like everything else, its a matter of research, questions, trial and error and Google, not to mention all of your assistance and patience! Thanks again Carlos!!! have an excellent weekend, appreciate your time immensely!
    135 pointsBadges:
    report
  • carlosdl
    Don't mention it. Thanks, and good luck.
    70,180 pointsBadges:
    report
  • 240210
    Dear Djr6004, I think, your problem has been solved ? Regards... ashiq_fsd@yahoo.com
    230 pointsBadges:
    report
  • 240210
    Dear Arazzaq2001k ! You can get it from me (Foxpro for Dos Distribution Kit ). If you have not found it from anywhere. Regards... ashiq_fsd@yahoo.com
    230 pointsBadges:
    report
  • Djr6004
    Hi Ashiq, Unfortunately I have not had the time to spend on this as of yet. So my problem is not resolved as of yet.
    135 pointsBadges:
    report
  • R10
    .BAK FILE CREATE BY .PRG FILE U CAN DELETE THESE FILES.
    10 pointsBadges:
    report
  • Casper271
    It must be .dbf file corruption. In that case it's suitable to try programming way of resolving issue. Try to use next one http://www.dbf.fixtoolbox.com
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following