Link to home
Start Free TrialLog in
Avatar of Fi-es
Fi-esFlag for India

asked on

How do I manipulate (write and read) a xml file in VB6?

Hi All,

My problem is...

I work for Retailing Management System. Front end is VB6, back end SQL Server 2005. My application has an interface called Item Fetch to select an item from a item list. The Item Fetch interface fetches all 20,000 items from the db server every time an item is selected. Around 50 sales counters are accessing the db server simultaneously. So the db server is over loaded, and the performance of my application gets reduced.

My plan is...

Fetch all 20,000 items from the db server only once, and save those in a file (preferably xml file) in the local machine. So that my fetch interface will load items from the local file. Thus the db server is free from item fetch queries.

My question is...

1. Does my idea sound good? If not, plz give your suggestion.
2. Which file format should i use to save around 20,000 items? xml or any other format? Hopefully csv (comma separated values) may not be suitable since item desc may have commas.
3. How do I manipulate (write and read) a xml file in VB6?

Thank you in advance.
Regin T.
Avatar of sasi_kmr
sasi_kmr
Flag of India image

increase the buffer at the application and database level and see the performance.

thanks,
$a$i
Avatar of Dirk Haest
I would say: redesign your application.
- What's the use of querying (and displaying) 20.000 items ? Aren't these divided into several itemgroups ?
- Do you use paging on your gui ?
- Why not limiting the search to x-number of items ?
Avatar of Fi-es

ASKER

I load all items to a recordset, and then filter items based on the filter criteria. Since all items are in the recordset, the user can smoothly filter the items on keypress. I use filter property of recordset. Here, i want to load all items to the recordset at the beginning.
>> Here, i want to load all items to the recordset at the beginning

Is your program used by multiple users ? Do they add/delete/update items ? If so, how does your program knows that an item has changed ?

(if you really want to load it once in your program, declare the recordset as public variable and load it in the startup of your program)
Avatar of Fi-es

ASKER

Hardly the list of items changes. Refresh button enables the user to refresh the items if required.

How do I manipulate (write and read) a xml file in VB6?
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fi-es

ASKER

thank you Dhaest