If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > how to modify DBF field datatype

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-06-04, 19:38
spoowiz spoowiz is offline
Registered User
 
Join Date: Mar 2004
Posts: 10
how to modify DBF field datatype

Hi,
I wish to change a field datatype from 512 char to a "memo" field in a dbf file (i don't know what version it is).

1. What software would I need?
2. Or as an alternative, can someone modify a sample database structure for me so I can test if my theory even works?

thanks,
phil

My theory is that a 3rd party software with updates the .dbf file would continue to work even if i change one of the field datatype from 512 char to memo.

I'm testing this theory because MSAccess link to this dbf file has a problem with the 512 char field.
Reply With Quote
  #2 (permalink)  
Old 03-07-04, 14:31
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
This gets REALLY complex, due to the limitations of some of the DBF drivers. The change is relatively easy to make, you just need to know which of the "flavors" of memo fields (if any) that the target application can support. The only real advice I can offer is to try a few of the possible formats (I'd usually start with a recent incarnation and work backwards until I found the most recent DBF version that the application would support).

-PatP
Reply With Quote
  #3 (permalink)  
Old 03-07-04, 17:17
spoowiz spoowiz is offline
Registered User
 
Join Date: Mar 2004
Posts: 10
Quote:
Originally posted by Pat Phelan
This gets REALLY complex, due to the limitations of some of the DBF drivers. The change is relatively easy to make, you just need to know which of the "flavors" of memo fields (if any) that the target application can support. The only real advice I can offer is to try a few of the possible formats (I'd usually start with a recent incarnation and work backwards until I found the most recent DBF version that the application would support).

-PatP
I found a program called dbfViewer and it says that the file type of my dbf file is "FoxBase+/dBASE II PLUSE, no memo".

What software/utility would I need to change the dbf structure?

thanks
Reply With Quote
  #4 (permalink)  
Old 03-08-04, 01:00
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
Looking at the file won't tell you much. It can tell you the minimum version of software needed to read/write the file, but not what versions of the DBF format are supported by the library used to create the file. You might be dealing with CodeBase which will support nearly every feature that any DBF file can use, or you might be using one of the "bare bones" DBF dump utility libraries that can't even read an NDX file, much less support memos!

You really need to find out more about the application that is writing the files you want to import. Without knowing that you are striking a match to see how much gasoline is left in the tank!

-PatP
Reply With Quote
  #5 (permalink)  
Old 03-08-04, 01:08
spoowiz spoowiz is offline
Registered User
 
Join Date: Mar 2004
Posts: 10
Quote:
Originally posted by Pat Phelan
Looking at the file won't tell you much. It can tell you the minimum version of software needed to read/write the file, but not what versions of the DBF format are supported by the library used to create the file. You might be dealing with CodeBase which will support nearly every feature that any DBF file can use, or you might be using one of the "bare bones" DBF dump utility libraries that can't even read an NDX file, much less support memos!

You really need to find out more about the application that is writing the files you want to import. Without knowing that you are striking a match to see how much gasoline is left in the tank!

-PatP
I see. Unfortunately, I won't be able to find out more about the application. I'll just have to modify the table and see if the application continues to work. So back to the old question: What software do I need to modify the dbf field datatype?

I want to spend the least amount of money to test my theory.

Thanks,
phil
Reply With Quote
  #6 (permalink)  
Old 03-08-04, 01:13
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
Depending on which dBase ODBC driver your machine has, Access alone should be able to make the change that you want. Just be careful, you may not get the results that you'd like, and you might well get unexpected changes due to the addition of the memo file... Some applications/libraries get really, really cranky! Make sure you have good backups before you try anything.

-PatP
Reply With Quote
  #7 (permalink)  
Old 03-08-04, 01:19
spoowiz spoowiz is offline
Registered User
 
Join Date: Mar 2004
Posts: 10
Quote:
Originally posted by Pat Phelan
Depending on which dBase ODBC driver your machine has, Access alone should be able to make the change that you want. Just be careful, you may not get the results that you'd like, and you might well get unexpected changes due to the addition of the memo file... Some applications/libraries get really, really cranky! Make sure you have good backups before you try anything.

-PatP
Yes. Your suggestion is about backups is a very good one. You say Access can do this? I've linked the dbase file with Access and it doesn't allow me to change the structure of the linked file.

Can you point me to where I can get more info on how to do this? Much appreciated. Thanks.
Reply With Quote
  #8 (permalink)  
Old 03-08-04, 01:26
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
I don't use Access much, and I'm bone tired. I'll try to look it up for you tomorrow.

-PatP
Reply With Quote
  #9 (permalink)  
Old 03-09-04, 12:34
spoowiz spoowiz is offline
Registered User
 
Join Date: Mar 2004
Posts: 10
Quote:
Originally posted by Pat Phelan
I don't use Access much, and I'm bone tired. I'll try to look it up for you tomorrow.

-PatP
thank you
Reply With Quote
  #10 (permalink)  
Old 03-10-04, 21:38
zulazriputra zulazriputra is offline
Registered User
 
Join Date: Feb 2004
Location: Malaysia
Posts: 8
Lightbulb

Maybe you can try FOXBASE programs. This program will allow you to create, delete and modify the DBF file.

Maybe this can help!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On