database

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
sid6.7
Veteran
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA
Contact:

database

Post by sid6.7 »

does anyone know where an example of a database program
made in qb is? to look at it for examples of input, search
edit?
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

Hi sid,

if you go here:
http://www.petesqbsite.com/sections/exp ... index.html

and click on my tutorial on file manipulation random access file I wrote a small database program there, a contact manager. I think you'll find it's a good start to what you want to do :-)

Hope this helps
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
guest-sid6.7

hmmm

Post by guest-sid6.7 »

ah i think i see what i am not understanding well...

when something gets written or extracted from a file
you dont grab/write each piece of a record...I.E

put/get rec#,x, y, z, a, b, c, d

what you want to do is grab/put the WHOLE thing....I.E

put/get rec#,xyzabcd ?

if you want to do compares or editing of your data
you break it up after that with your variables then
work on it..

am i following you correctly?

thanks mystik...
sid6.7-guest

oops

Post by sid6.7-guest »

oh lord my brain may be actually working...

i think im gonna have to re-write a game i've been working
on for 2 years....if the above is true...SHEEP!!!
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

A quote from my dad: "nothing on the internet is true"

Now I will prove him wronge...

TWO PLUS TWO EQUALS FOUR!!!!
Image
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

LOL anthan.

Sid, if you read my tutor then if you use a TYPE definition instead of individual fields it will make your coding life much easier :-). Juust follow my example and you'll see it works great that way :-)
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Re: database

Post by moneo »

sid6.7 wrote:does anyone know where an example of a database program
made in qb is? to look at it for examples of input, search
edit?
Maybe you don't need a database approach at all.
How many records do you have or expect to have as a maximum for this file?
What is the largest record that you need to use?
What is the size of the key that you'll be using?
Do you have multiple keys per record?
Can you have duplicate keys? That is, the same key for different records?

The answer to these questions will determine whether you need to use a database. Answer them and I'll do an analysis for you.
*****
Post Reply