Solved

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

Posted on 2010-08-26
7
574 Views
Last Modified: 2012-05-10
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.
0
Comment
Question by:Fi-es
  • 3
  • 3
7 Comments
 
LVL 3

Expert Comment

by:sasi_kmr
ID: 33528879
increase the buffer at the application and database level and see the performance.

thanks,
$a$i
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 33528946
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 ?
0
 

Author Comment

by:Fi-es
ID: 33528979
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.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 53

Expert Comment

by:Dhaest
ID: 33529032
>> 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)
0
 

Author Comment

by:Fi-es
ID: 33529312
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?
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 33529320
VB6: XML and How To Read It With Visual Basic
http://www.nonhostile.com/howto-xml-vb6.asp

Getting Started with VB 6 and XML
http://www.informit.com/articles/article.aspx?p=25084

Creating XML documents with the DOM in VB6
http://articles.techrepublic.com.com/5100-10878_11-1044759.html
0
 

Author Comment

by:Fi-es
ID: 33530008
thank you Dhaest
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now