Important alert: (current site time 7/16/2013 1:12:26 AM EDT)
 

winzip icon

[ Build DataBase In Text File ] - Pure VB

Email
Submitted on: 5/17/2005 4:30:55 AM
By: JJJJJJJJ  
Level: Intermediate
User Rating: By 49 Users
Compatibility: VB 6.0
Views: 50940
(About the author)
 
     A fast DataBase driver without ADO, DAO reference, in pure vb. It is not using any third party product. The Data is stored in a standard text file, in the most simple format. The driver is made in Class as well as ActiveX Control. Most of the basic functions are included. You can view the data structure by opening the file in Notepad. You are free to use it and give me your feedback. Good Luck!

 
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 43 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 Intermediate 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

5/17/2005 4:55:56 PMEagle

Hi Jim
Don't you like smart As_es.Actually I like what you have done. There is room for improvement as all projects do when they are first started. I have worked with many DB types over the years and this has potential. Infact I am developing some software for a home made CNC machine and I keep track of some information in text files. I tryed your method out and it will work just fine for what I am doing. When I get a bit of time in the next couple of days, I will send some suggestions. Thanks again for the idea.
(If this comment was disrespectful, please report it.)

 
5/17/2005 9:37:53 PMdreamvb

Hi not a bad little start you made there.ok here are some suggestions. How about some table support that can also be packed into one file. and also options to add multiply fields names, field types, field sizes etc.

I am sure that will be quite easy becuase you have already got a sort of base for it.

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

 
5/17/2005 11:34:37 PMBill K of Boston

nice work!
Bill
(If this comment was disrespectful, please report it.)

 
5/18/2005 12:00:47 AMJim Jose

Hi Guys,

Thanks for your comments. As dreamvb said, this is only a starting work on this purpose. I submitted it now to get your comments and suggessions to make it perfect. I will try to add those features mentioned.

Thanks again and welcomes more comments!
(If this comment was disrespectful, please report it.)

 
5/18/2005 12:40:47 AMTemosis

How about creating a sample phone book with picture! That can teach alot!
(If this comment was disrespectful, please report it.)

 
5/18/2005 1:25:23 AMRobert Rayment

I think it is good that this does not have lots of extra features since, as it is, it relatively easy to modify to suit oneself *****
(If this comment was disrespectful, please report it.)

 
5/18/2005 3:59:32 AMJim Jose

Yes Robert,

This version is with the basic properties and it will be available in this form even after including anything more...

Anyone having problem with speed?...
(If this comment was disrespectful, please report it.)

 
5/18/2005 7:33:36 AMTerriTop

Hey Jim,

Nice start. I like the fact that the files are simple TXT files, as this makes editing and locating record information possible without the need for a special library. Have you considered this same concept, but using XML schemas? Just a thought....5 from me!

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

 
5/18/2005 7:46:12 AMNoFutur

Very Gooooood (y)
5 globes from me
(If this comment was disrespectful, please report it.)

 
5/18/2005 10:49:41 AMZirro Tolerance

Looks like a good start. Some things that will make it a little more usable.

Example:

Public Property Get EOF() As Boolean
EOF = ((m_RecordPosition + 1) > (RecordCount - 1))
End Property

Public Property Get BOF() As Boolean
BOF = ((m_RecordPosition - 1) < 0)
End Property

And to make it faster would be to set a variable for field count once you open the file. Use Mid$( instead of Mid(. Other than that its 5 globes.
(If this comment was disrespectful, please report it.)

 
5/18/2005 10:57:05 AMZirro Tolerance

One bug i found is if you are searching for "Emp Name 333" it will also find "Emp Name 3334".
(If this comment was disrespectful, please report it.)

 
5/18/2005 1:49:40 PMRichard Mewett

Hi Jim, could you email me - I have a question!
(If this comment was disrespectful, please report it.)

 
5/18/2005 2:49:36 PMRussell Sanders

great thinking. Thanks for sharing
(If this comment was disrespectful, please report it.)

 
5/18/2005 5:04:23 PMStavros Sirigos

Nice and clean coding. It has potential for improvement, but it is a pretty good start, nonetheless. 5*
(If this comment was disrespectful, please report it.)

 
5/19/2005 3:45:58 AMRichard Mewett

This is a good single class solution for simple data storage & some good code for those new to the file statements.
(If this comment was disrespectful, please report it.)

 
5/20/2005 6:52:31 AM

Hi Jim, nice code! There is a little thingy when searching exact whole strings. Maby there shoud be a line for exact strings. Now searching for "Emp Name 111" results "Emp Name 1110" and also "Emp Name 1111" & "Emp Name 1112", etc. 5 Globes for your code anyway, but love to see it getting updated!
(If this comment was disrespectful, please report it.)

 
5/20/2005 8:37:05 AMJim Jose

Sure!,

Actualy the find function is realy in an infant stage. I will surely add [match case] and [Find whorl word only] option.

I am preparing a 'DataBase Builder' for this. Soon that will be available!

How many of you wish to have [multiple tables] in the next update????
(If this comment was disrespectful, please report it.)

 
5/20/2005 1:32:39 PM

I learnt a lot from it. And as PSC sharing is about learning, this is good. Thanks Jim.
(If this comment was disrespectful, please report it.)

 
5/20/2005 4:55:07 PM

That would be nice Jim [multiple tables] + manually changing m_FieldLen would be great! Keep up the GOOD work!
(If this comment was disrespectful, please report it.)

 
5/20/2005 11:57:26 PMJim Jose

Manually changing FieldLength???,

Wow that would need complete database replacement. Ok, I will try that!!!. Thanks for your suggession and votes.
(If this comment was disrespectful, please report it.)

 
5/21/2005 6:18:02 AM

Little sarcasm! Sorry for the misunderstanding. By manually I ment, there would be a function within the code to give FieldLength instead of writing the length in the Text-file manually. This way it is possible to start the writing-process without making a text file first (and writing 30,30,20,20>). I know this is a little tricky, maby this way there would be need of 's or character specific [Split]'s. This could slow down the search process... But anyway, thx for your quick respons!
(If this comment was disrespectful, please report it.)

 
6/7/2005 1:11:34 PM

Are you planning to upgrade your code?
(If this comment was disrespectful, please report it.)

 
6/9/2005 8:19:36 AMJim Jose

Absolutly,

I already created multiple table, field, FieldName properies to the database driver. I am now creating a 'DataBase Builder' for easy building of database file ( since there is multiple table it is not easy to make it manually on Notepad).

I have a plan to build a 'DataSheet' activeX to use the file in any other program and edit it as MsAccess datasheet.

What you think??
(If this comment was disrespectful, please report it.)

 
6/9/2005 9:55:21 AM

Very nice! Will it stil be open source?
(If this comment was disrespectful, please report it.)

 
6/11/2005 5:46:46 AM

Good...good!Keep working
(If this comment was disrespectful, please report it.)

 
6/27/2005 10:20:44 AMRiccardo Cohen

Nice code, thanks for sharing. 5 globes from me. If the code that I saw within this upload is in such a good state, I am very impatient to see what it has become in the next upgrade. Hope to see it soon!
(If this comment was disrespectful, please report it.)

 
6/28/2005 4:57:35 PM

I am most curious about the progress of the 'DataBase Builder' (multiple tables generation etc).... Need some help?

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

 
6/28/2005 5:11:23 PMJim Jose

Hi,

Actually I was working on another code 'MacCalendar' for some days. I temporarly lost my will to work continuesly on this.

U people realy made me interested in updating this as early as possible. I wish I can submit it in a few days.


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

 
6/28/2005 5:13:20 PMJim Jose

Hi Unknown,

Thanks for ur interest in the code and ur helping mind.
(If this comment was disrespectful, please report it.)

 
6/28/2005 5:15:45 PMJim Jose

I don't know how much I can satisfy ur needs on the 'DataBase Builder'. I will try my best, and only with ur help I can complete it.
(If this comment was disrespectful, please report it.)

 
6/29/2005 5:35:37 PM

What kinda help do u need?
(If this comment was disrespectful, please report it.)

 
12/8/2005 11:26:24 PMbaambaang

very good!

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

 
12/27/2005 5:41:31 AMmorb

nice work :P
(If this comment was disrespectful, please report it.)

 
12/28/2005 11:10:02 AMAster

Nice work! More power to you man!
(If this comment was disrespectful, please report it.)

 
1/20/2006 1:42:29 PMHeriberto Mantilla Santamaria

Hi Jim, this's a great program, you still work in this project?, I think is excellent if you can implement multiple tables, fields, fieldsize, fieldtype and support SQL sentences.

Thx for the idea and if you need help with this, I can help you coz this program is sensational.
(If this comment was disrespectful, please report it.)

 
1/21/2006 5:16:57 AMJim Jose

Heriberto,

Ooops, I am currently not working.. but using a modified version of this code. Yeah, I worked for a long term(not sooo long!!) for getting it into multiple tables. But, things become more complex and I can't get it bug free... So I gave up temporarly!!

The probelm is.... For using multiple tables, I used to storing data in two formats(two structures) and need to be splitted into seperate files at the time of opening it. Then modifying each files seperatly then combine into one main file(when terminating the connection)... Isnt it a bit confusing???

If u have a better idea to get multiple tables... please inform me!!

I know u r good in php(i am not). But I made exactly the same database system as a php class file(needs many more fixes) If u are interested please mail me.

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

 
1/30/2006 2:50:28 PMFilip

Do you know the Cheetah database. Just one DLL of 73K !

http://www.planetsquires.com/cheetah.htm
(If this comment was disrespectful, please report it.)

 
2/1/2006 1:31:00 AMDavid Nedved - DaTo Software

WOW! 5*
(If this comment was disrespectful, please report it.)

 
2/3/2006 9:55:47 AMDann Winter

Sparq
I live in Mexico and a years ago, I saw this technique but using other language, anyway it´s great this idea.
(If this comment was disrespectful, please report it.)

 
7/18/2006 7:44:16 PMDavid

Good code.

I followed the tip regarding the Cheetah database.

It was awesome!! For very simple apps your code is good enough I think. But anyway I would highly recommend Cheetah to anyone. Saved me tons of time.
(If this comment was disrespectful, please report it.)

 
7/19/2006 8:19:41 AMJim Jose

I just submitted the php version of this code on PSC-vb section. You can find it here.... http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2044&lngWId=8
(If this comment was disrespectful, please report it.)

 
7/27/2006 5:51:54 PMAchmad Junus

Cool :) How about use .dbf for your data?
I'll give some rocks**** (There allways room for improvement)
(If this comment was disrespectful, please report it.)

 
1/29/2007 1:07:58 AMiron

add pictures and can play sound...
(If this comment was disrespectful, please report it.)

 
3/14/2007 2:01:15 AMZeraphine

Hey Jim great work...but you havent uploaded a updated project for a long time i see....can you please upload the latest version...

this is definitely 5 stars
(If this comment was disrespectful, please report it.)

 
3/20/2007 6:15:33 AMNico RUelo

Aztg 2ng planet source code
(If this comment was disrespectful, please report it.)

 
6/15/2007 5:00:09 AMJason

Hmmm interesting concept... I'm gonna check this out, see if it will work for my project. Keep it up!
(If this comment was disrespectful, please report it.)

 
7/2/2007 6:31:53 AMAlkesh

hi this is vyas alkesh .from india i m studying in bca in 6th sem and i have got many code from this site .
so thanks to very much>

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

 
7/5/2007 7:15:01 PMM. T. Hadi

Excellent, easy to use, solid piece of work - Thank you very much - This is very good in a single stand-alone environment & project - but I think it will struggle a bit in a multi user enviroment, due to the sequential nature of the file access and file lock.

I will be using this in my next project - I love it.... 5 Globes from me...
(If this comment was disrespectful, please report it.)

 
7/6/2007 10:35:37 AMJicky

very good job guy. if you add command 'create table', it's very perfect!
GOOD JOB
(If this comment was disrespectful, please report it.)

 
10/18/2007 7:13:02 PMKhan

Is it possible to include reports like data reports in this program? If you could somehow do that, it would be great.:)
(If this comment was disrespectful, please report it.)

 
12/14/2007 3:26:15 PMIulian

Thank you very much,i really needed this
hoppe it works ;)
(If this comment was disrespectful, please report it.)

 
3/4/2008 6:18:40 AMRob C

Jim,
Regarding the requests for multiple Tables:
How about using separate files, one for each Table ?

Thanks for sharing,
Rob
(If this comment was disrespectful, please report it.)

 
4/4/2008 5:08:00 AMJoko

Thanks you very much for your code...
(If this comment was disrespectful, please report it.)

 
4/6/2008 1:26:30 AMJoko

Thanks, you're the best
(If this comment was disrespectful, please report it.)

 
4/17/2008 11:26:19 AMNick

Can i add more things? that he adds in a txt because i m making a program that saves my runescape accounts with
Pass
acc
recovers.. so i need 7+ saves do u know how to? Mail me please.
(If this comment was disrespectful, please report it.)

 
5/22/2009 4:35:22 AManto

terimo kasih mang.... lumayan untuk referensi tugas
(If this comment was disrespectful, please report it.)

 
3/21/2010 7:28:57 AMTNA

Nice work dude!!! 5+
(If this comment was disrespectful, please report it.)

 
3/31/2010 11:32:15 AMEva Millana

Very Nice, I use it on my Project right now !!Very nice !!!Thank u for sharing
(If this comment was disrespectful, please report it.)

 
3/4/2011 10:19:55 PMvitthal vende

Very Nice, I use it on my Project right now
!!Planet Sourse Code Team !!!Thank u for sharing cods.,,!
(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.