Alpha Video Training
Results 1 to 20 of 20

Thread: converting old .dbt files?

  1. #1
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default converting old .dbt files?

    This is a longshot but maybe I'll get lucky....

    I have a situation where I need to convert some files from another database on a regular basis. Unfortunately, these files seem to be using a .dbt memo file that can be read by A4 but not by A5. Not even by A5v1.

    I could buy a 3rd party program to convert the files on my own system but....

    Since the app will be sold (hopefully) to many companies, each company would need to be able to convert the data as easily as possible. Asking them to open a different program, convert the files, then go back to my program really isn't very appealing, probably would cause all kinds 'service' calls, and is not a very good selling point either.

    Anybody know of a better, more 'behind the scenes' way to convert/fix a memo file?

    I looked at an 'original' and 'converted' file and tried to see if I could just poke some values into the header. It looked like it might work but it didn't - at least, not the way I did it. The 'poked' values went in fine. They just didn't solve the problem.

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,300

    Default

    Cal, have you actually tried to open the table (before the fpt file exists)? I thought Alpha Five would convert the Alpha Four table automatically, creating the necessary fpt file for you. -- tom

  3. #3
    VAR davej's Avatar
    Real Name
    Dave Jampole
    Join Date
    Apr 2000
    Location
    Haughton, LA ( just east of Shreveport, Louisiana)
    Posts
    2,524

    Default Converting A4V6 .dbt Files

    Cal,

    I just did what Tom suggested and it worked 100%.

    I opened A5V6, clicked File, Open and navigated to an existing A4V6 application that has a .dbf file, opened it and then used the default form (in A5V6) to view the data. The memo field opened with no problems whatsoever.

    Dave
    Dave Jampole
    www.customalpha.com

    Women and cats will do whatever they want. The sooner men and dogs realize that, the happier they will be.


  4. #4
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default

    The problem is that A5 can't open the table. It says the memo file can't be found. Since it can't open the table, it can't convert the memo file either.

    It opens in A4v7 just fine.

  5. #5
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,945

    Default

    cal, have you tried a script to test if you can say something like

    file_add_to_db()

    and see if it will convert the appropriate tables automatically

  6. #6
    "Certified" Alphaholic
    Real Name
    Finian Lennon
    Join Date
    Apr 2000
    Location
    Atlanta, GA
    Posts
    1,790

    Default

    Cal:

    I seem to remember that conversion of the dbt file in A5V1 was something you chose to via a menu option, it didn't happen automatically.

    Finian

  7. #7
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,300

    Default

    Cal, perhaps it's worth trying in A5v4, or A5v5? I'd be happy to try it here, also, if you can post a sample table, including the dbt file.

    The sequence I'm recalling would look like this:

    a) copy the DBF and DBT to a new folder
    b) use A5v? to create a new database there
    c) use the control panel to 'add' the table to the database

    -- tom

  8. #8
    Member
    Real Name
    Barry E Leighton-Potter
    Join Date
    Sep 2005
    Posts
    48

    Default Same problem

    Cal,

    I recently had the same problem, I used a DBF fix program found at
    http://www.dbf-repair.com. The prog has various options and I know that the
    fixed DBF can be opened directly in Alpha once it is fixed.
    Perhaps you could do somethong with this.

    Barry

  9. #9
    Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,591

    Default

    It's been a while since I've done this Cal, but I think an append operation will convert the data for you. Create the structure you need in A5 then just append the A4 data into it.
    -Steve


  10. #10
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,696

    Default

    I never thought this was a problem, but with most folks thinking it is, I went back to test.

    Took table with dbt memo from 2 different old A4 systems and put in a new directory.
    Created a new database in v6 and added the tables.
    Opened default browse successfully. Opened default form and added text to the memo field, and saved. The updated memo stays in dbt format as I remembered. Alpha Five will maintain a DBT file, it just won't create one.

    To change to FPT format, I added a Dummy, C1 field to the structure. This does the same thing as Steve's append. Or you could also do a Duplicate operation.

    In short, I have found the A4 DBT files to be no problem in A5.

    Bill.

  11. #11
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default

    OK, here are two files to work with (a .dbf and the matching .dbt) if you'd like to see what you can do.

    I appreciate the attempts to help but youse guys ain't reading very carefully. The most critical comment as stated in my second post above:

    The problem is that A5 can't open the table. It says the memo file can't be found. Since it can't open the table, it can't convert the memo file either.

    Also, since it can't open the table, it can't be restructured or appended to anything.

    If there is a solution, it will probably have to be from outside A5 or some type of byte manipulation within a5.

    I have tried a 3rd party program and that works fine. However, again as previously stated (in less detail), I don't feel it's reasonable to ask users of my app to open a 3rd party app maybe 10-20 times a day to convert files before importing them to my app. These files that are being imported are the result of an export from another program and, unfortunately, this is the only available export format and the existing data seems to be in a proprietary format.

    I have tried overwriting the existing memo file with a converted memo file and that allows me to read the rest of the data (always just one record like the attached samples) but that doesn't help with the data in the memo fields. It does prove that the issue is in the .dbt file - for whatever that's worth.

    By the way, I happen to know that the memo fields in the sample are actually empty but the data in this specific sample file is not the issue. Converting other files from within my app is the problem.

    And, for what it's worth. I agree that any file created in A4 with a memo field(s) can be easily converted to a v5/.fpt format. The problem is that these files don't come from A4 even though they can be read by v4 - but not v5.
    Last edited by CALocklin; 11-08-2005 at 06:09 PM.

  12. #12
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,556

    Default Where is this file from?

    Cal

    I looked at your file with Dsalvage. It stated that the memo file header is corrupt. The file should follow the dbase standard for headers and pointers (even though Alpha/codebase doesn't).

    I've attached some of the messages that I've gotten as I've tried different Dsalvage operations on the file.

    Do you have an example of this where it works with Alpha? We might find the problem in the header by comparing the two files......

    Or by looking a little farther, I edited the record in hex mode and found that all of the values after the rf_* series of fields have a 20 as it's value... ie blank. That's an illegal memo pointer (and a non pointer besides..) Note the bottom image in the series of images attached.

    Something goofy is going on here....
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  13. #13
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,696

    Default

    A4 creates a memo file padded with 00 (hex) to 512 bytes if all memos are empty. Cals dbt file is 24 bytes, with no padding.

    You probably know that if the memo is edited in A4 the memo can then be read by A5 since A4 then adds the padding.

    You also indicated that real world memos would have data. Can a dbt > 512 bytes be read by A5? I have not tried adding the padding to a shorter dbt to see if that makes it readable.

    Bill.

  14. #14
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,300

    Default

    Wonder if it would make sense to use a hex editor on the DBT to add the 00 hex padding manually, and then determine if A5 can read/recognize the memo field text. If the source data is going to arrive one record at a time, A5 could be scripted to open the DBTfile in binary mode, add necessary padding, and then write it back to disk. All before opening the table.

    ---------------------

    Follow up...

    This looks promising.

    I took Cal's DBT file, opened it with a hex editor. Inserted 00 (hex) 488 times, then saved it to disk. I then cranked up A5v6 and it opened the table just fine. I entered some text in the empty memo field.

    -- tom
    Last edited by Tom Cone Jr; 11-09-2005 at 12:03 AM.

  15. #15
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default

    Thanks guys. We are getting closer.

    I don't know why I didn't try it before but editing a memo field in v4 does make the file usable in v5. This still isn't a solution but at least it's some positive info.

    When I looked at this file, it appears that the only difference is the additional "00" bytes mentioned by Bill. And, I see that Tom has chimed in now and I tried the same thing with the same results.

    The next thing I'll try to do is get a memo file with some data in it. From what I hear, it's not common to have memos but does happen and I need to be able to handle it. Hopefully I can get someone to either find one or create one for me. Maybe with this info the solution will be obvious once I see a "used" memo file.

    I'll let you know what I find out.

    (And I hope nobody was offended by my previous comment. It wasn't meant to be offensive - just a wake up call.)
    Last edited by CALocklin; 11-09-2005 at 12:19 AM.

  16. #16
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,300

    Default

    Cal, I've reconfirmed earlier findings. If you pad the empty "dbt" file you're receiving with 00 hex all the way to 0200 hex, Alpha Five v6 can open the table, and the memo field is editable. -- tom

  17. #17
    Member
    Real Name
    Barry E Leighton-Potter
    Join Date
    Sep 2005
    Posts
    48

    Default converting old .dbt files?

    Cal,

    Attached is your x250 which can be read in A5v6 or A5v7.
    It's not an absolute solution but readable

    Barry

  18. #18
    Member
    Real Name
    Jan Mark
    Join Date
    Sep 2001
    Location
    Billdal, Sweden
    Posts
    36

    Default

    I had the very same problem trying to make a database in V7 from an Approach dbf file. The file could not be opened because of the memofield. I changed the memofield in Approach to text and the file could be opened in A5. I have not yet tried to convert the text file back memo since it works as it is for me.

    Jan Mark

  19. #19
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,696

    Default

    You did not say if you will need to use the memo text if it exists. If it turns out you do not need it, then the solution is simple. Just keep a good empty dbt file created by A4 and use that with each dbf. For that matter, it could be a fpt.

    If you need the data then you need to proceed with the correction procedures.

    Bill.

  20. #20
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default

    As you might have guessed, I'm just getting started on this project. I've asked for a table with actual memo data but I'm still waiting for the file.

    And, yes, I will need to deal with at least one of the memo fields. (There are actually two tables with memos - I believe one has one memo field and the other has three.)

Similar Threads

  1. Converting database files from Alpha 4 to Alpha 5
    By Jasmine in forum Upgrading to Alpha Five from Alpha Four
    Replies: 8
    Last Post: 01-10-2007, 12:51 AM
  2. Converting Memo Fields and dbt files
    By jimmy dean in forum Upgrading to Alpha Five from Alpha Four
    Replies: 11
    Last Post: 10-12-2006, 10:51 AM
  3. Converting V4 to V6
    By Nick Marodis in forum Alpha Five Version 6
    Replies: 12
    Last Post: 08-16-2004, 01:13 AM
  4. converting access files to alpha 5 v1
    By carie gray in forum Alpha Five Version 1
    Replies: 6
    Last Post: 06-27-2003, 06:33 AM
  5. converting from V6
    By Jimmy Vallance in forum Alpha Four Versions 7 and 8
    Replies: 6
    Last Post: 05-04-2003, 01:10 PM

Bookmarks

Posting Permissions

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