Solved

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

Posted on 2010-08-26
7
581 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

738 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