Important alert: (current site time 7/16/2013 2:18:15 AM EDT)
 

winzip icon

A Class for accessing dBase or FoxPro dbf file without ADO

Email
Submitted on: 7/23/2009 9:11:59 AM
By: Achmad Junus 
Level: Advanced
User Rating: By 12 Users
Compatibility: VB 6.0
Views: 21513
(About the author)
 
     UPDATED. This class is made to access dbf file. This class can read and write to a .DBF file. This class can create a new file, and creating fields as well. Some additional functions are provided, such as, search record, find text, search distinct value, etc. Good or bad, please leave your comment and vote. :)

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 5 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
7/9/2008 4:24:18 AMphil

useful!
(If this comment was disrespectful, please report it.)

 
7/10/2008 8:29:02 AMAchmad Junus

I did not use any screenshot. I know that my demo project was not shows all of available functions in the class. But I know that the class itself is very usefull.
(If this comment was disrespectful, please report it.)

 
7/10/2008 1:00:25 PMPerra

Nice, more code with FoxPro Pleace, Adding, editing and deleting.
(If this comment was disrespectful, please report it.)

 
7/10/2008 10:10:09 PMenmity

it does not support non-ascii chars, use lstrlen to get the actual length of strings, and try to use byte array to handle content.

(If this comment was disrespectful, please report it.)

 
7/25/2008 5:28:19 AMAchmad Junus

@Perra
Ooops...
The functions for adding, editing and deleting are already there in the class.

(If this comment was disrespectful, please report it.)

 
7/27/2008 2:43:55 PMseruling

Good code. I can view and doing some simple query with your demo project. The demo project is not presenting the true ability of the class. I think you must re-create your proper demo project.
The class itself is very good.
If you add more functions, such as copy field, indexing, sorting, etc, I am sure your class will be more useful.
(If this comment was disrespectful, please report it.)

 
8/2/2009 7:20:45 PMAchmad Junus

I have change several line in function SearchAll().
The changes are:
1. Redim the lBuffer to the amount of records number
2. Remove redim preserve within the search loop

By doing this, the search performance will increase significantly while large number of records found.
(If this comment was disrespectful, please report it.)

 
8/2/2009 7:24:17 PMAchmad Junus

I cannot add Pack() function, because VB file IO functions doesn't provide function to trunctate file size.

(If this comment was disrespectful, please report it.)

 
1/30/2010 11:17:55 AMlupetalo

Nice but how to really delete something from table without copying it to another?
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.