|
rob Novice
Joined: 12 Oct 2000 Posts: 30 Location: Australia
|
Posted: Sat Oct 19, 2002 4:53 am
Printing from a database and a networked db |
I have managed to get quite a few items in my database and wish to print it out. I use the following command to grab all the records and print them to screen so i can just copy and paste to my editor:
#DBLOAD EquipmentDB
#LOOP 0,1000 {
#SHOWDB %dbget( %i)
}
#DBRESET
#DBSAVE
#DBCLOSE
The reason for the loading and saving and closing of the database is i share it over two networked pcs and if i keep the db open on one pc and try to add somthing to it on the other pc, it doesn't update properly. This method of opening and closing the db any pc which wishes to update or access the db seems to work fine but if anyone else has a better method please tell.
The only annoying thing is in my various views i have some extra fields in some and not others. e.g. in weapons i have attack_type field and in potions i have spells field. There are many more but when i use the showdb to print the current record to screen it prints all the fields even though each view doesnot show all of them. Is this because the All view shows all the fields? If so is there a way of printing each view to screen in a nice format only showing the fields in that view.
Thanks for the help
Cheers Rob |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Oct 19, 2002 6:09 pm |
quote:
I have managed to get quite a few items in my database and wish to print it out. I use the following command to grab all the records and print them to screen so i can just copy and paste to my editor:
#DBLOAD EquipmentDB
#LOOP 0,1000 {
#SHOWDB %dbget( %i)
}
#DBRESET
#DBSAVE
#DBCLOSE
The reason for the loading and saving and closing of the database is i share it over two networked pcs and if i keep the db open on one pc and try to add somthing to it on the other pc, it doesn't update properly. This method of opening and closing the db any pc which wishes to update or access the db seems to work fine but if anyone else has a better method please tell.
The only annoying thing is in my various views i have some extra fields in some and not others. e.g. in weapons i have attack_type field and in potions i have spells field. There are many more but when i use the showdb to print the current record to screen it prints all the fields even though each view doesnot show all of them. Is this because the All view shows all the fields? If so is there a way of printing each view to screen in a nice format only showing the fields in that view.
Thanks for the help
Cheers Rob
There's a better solution, but it requires using something far more powerful than ZMud and so you'll either need to do it separately (ie, no ZMud code included), through the COM interface, or by simply #LAUNCHing said application.
li'l shmoe of Dragon's Gate MUD |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|