Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to edit/save data on a form?

Status
Not open for further replies.

vbhvw

Programmer
Sep 4, 2006
7
0
0
NL
Hello,

I would like to manually edit some data during runtime and save/load it to/from any file.

I think about a kind of Grid-component like DataGrid but it must be editable by an operator during runtime without being connected to any database.

What kind of object do I need?
I tried many but can't find an editable one (without a connected database).

regards,

Henk
 
Hi!

storage media:

The next best format to save your data to a file (a database is a file too, but you dont't want to use a database) is to store it in a XML-File.

data display:

There are several vb-controls. The best Grid for vb6 is TrueDBGrid from Apex Software. It supports an unbound mode and an array mode. MS-Flexgrid couls be a "free" alternative.

SmallTalker
 
Also, version 5.0 of the Microsoft Data Bound Grid supports an unbound mode.
 
As dtqbterror suggests, a disconnected recordset would be a good approach here. And you can save it to (and load it from) any file by using ADO's stream object (write the disconnected recordset to the stream, then save the stream). With this method you can even take on board SMallTalker's suggestion, and elect to have the stream saved as XML
 
strongm, why shouldn't you just use the .save method of the recordset, and save it as an xml file that way, rather than using an intermediary stream object?
 
Habit ...

I generally use the stream object because it is more flexible - but in this case the standard Save would be equally applicable
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top