About
Community
Bad Ideas
Drugs
Ego
Erotica
Fringe
Society
Technology
register | bbs | search | rss | faq | about
meet up | add to del.icio.us | digg it
Go Back   Community > Technology > Technophiliacs & Technophiles
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Technophiliacs & Technophiles The Technophiliacs forum is for discussing any and all forms of tech and other types of social backwardness. Including discussions of strange home-brewed hardware technology. Where to get good tools. How to make fiberglass molds. Computer hardware and software technolgy, including operating systems, applications, networking, hardware, CPU's, disk drives, and other geeky things. Viruses and Artificial Life discussions. How to write HTML. End user tools discussions and support issues. Gating the Internet with other nets.

Reply
 
Thread Tools Display Modes
 #1 
Old 2002-12-17, 02:50
nothingSafe nothingSafe is offline
Regular
 
Default [VB] Programming Database Program

I have a project, it's kind of uh, due tomorrow. Anyways, i did most of it, i just havent figured out how to save the records to a text file and print one record/all records.
The project file, forms, and DB --> http://sp0rk-tech.net/dbProject.rar

I need to:
- Print single Record
- Print All records
- Save all records to text file:
Record1
-------
Record2
-------
etc...

Any help would be greatly appreciated!
 #2 
Old 2002-12-17, 17:24
cense cense is offline
Regular
 
Default Re: [VB] Programming Database Program

If you already have done the insert, retrieve, modify, and remove functionality than printing this should be fairly trivial.

To print single record in pseudo c++ code (sorry, havent looked at what language you are coding in:

code:
fstream FILE;
FILE.open(filename, ios: :out);
Class.GetRecord(pos, &record);
Print FILE record->name;
Print FILE record->item1;
Print FILE record->item2;


FILE.close();
to print all records int he same pseudo code:

code:
fstream FILE;
FILE.open(filename, ios: :out);
while(pos <= Class.Length()) {
Class.GetRecord(pos, &record);
Print FILE record->name;
Print FILE record->item1;
Print FILE record->item2;
++pos;
}
FILE.close();



Ok, thats was for saving/printing to a file.

Are you simply looking for a tutorial on file handling?

edit: damn smileys

edit: DOH! in VB.... sorry man.

[This message has been edited by cense (edited 12-17-2002).]
 
To the best of our knowledge, the text on this page may be freely reproduced and distributed.
 

totse.com certificate signatures
 
 
About | Community | Bad Ideas | Drugs | Ego | Erotica | Fringe | Society | Technology
Hot Topics