Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Adding to a file created in dbpro

Author
Message
Panda lover
18
Years of Service
User Offline
Joined: 22nd Feb 2006
Location:
Posted: 7th Jan 2007 17:47
When you create a file using dbpro and wrote values and that into the file and then u need to add more information to the same file later on how can u get dbpro to open the file to write after the previous values?
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Jan 2007 19:16
Quite simple really!

You just need to read the contents of the file into an array, tag the new info on the end of the array, then finally delete the file and write the array containing the new info out to a newly created file with the same name.

There may be an 'Append' option in DB Pro when writing files, but I don't think so...

TDK_Man

Profit
18
Years of Service
User Offline
Joined: 19th Feb 2006
Location: United States
Posted: 7th Jan 2007 19:28 Edited at: 7th Jan 2007 19:29
I am unfamiliar with dbpro, but it would be something like 'open file for append'

edit: TDK beat me to it.

common people are walking in line.

Mitsu Fly Ride.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th Jan 2007 23:33 Edited at: 7th Jan 2007 23:36
this is one of the things included in my DBP_NETLIB plugin.
at the time I wrote the plugin dbp's string and file functions were attrocious, at least compared to what I was used to in vb/vb.net. Maybe its been added to since then, but I havent used dbp in a long while so I cant say. The netlib plugin has around 70 functions, some of which you might find useful aside from string and file manipulation. It even has a variable watcher which is kinda cool.

have a look at my [href]dbp page[/href]
all plugins are free and fully documented

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 8th Jan 2007 01:59
It would be nice but there is no append command in Pro.

Login to post a reply

Server time is: 2024-09-25 15:20:51
Your offset time is: 2024-09-25 15:20:51