Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 3rd, 2004, 03:05 AM
Registered User
 
Join Date: May 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to program with XML from VB

Help Me...!
Please give me sample program on
how to link with xml doc and sending
and receiving records from xml doc
through Visual Basic Programming!


 
Old September 30th, 2004, 06:19 AM
Authorized User
 
Join Date: Sep 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Lalit_Pratihari
Default

Hi,

You can create a XML file through VB by executing the following script:

Dim Conn as new ADODB.Connection
Dim Rs as new ADODB.Recordset

Set Rs = Conn.Execute("SELECT * FROM TABLE_NAME")
Rs.Save Folder_Path & "\" & "XML_FILENAME.XML", adPersistXML

You can read a XML file through VB by executing the following script:

Rs.CursorType = adOpenDynamic
Rs.LockType = adLockReadOnly
Rs.CursorLocation = adUseClient
Rs.Open XML_FILENAME, "Provider = MsPersist"
Rs.Sort = "Field ASC"

Hope this helps,

Lalit
Life Means More...;)
 
Old October 4th, 2004, 03:42 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Anantsharma Send a message via Yahoo to Anantsharma
Default

HI,

Well XML support is there with ADO recordset (ADO 2.6 and hiegher). This can be used for a simple XML file. If u want to implement advance XML using, U have to use XML DOM object. U can find a alot of code on this on internet (go through google.com).


Hope this takes u to the point

B. Anant





Similar Threads
Thread Thread Starter Forum Replies Last Post
Call VB exe in another vb program Swati Chari BOOK: ASP.NET Website Programming Problem-Design-Solution 1 March 14th, 2008 11:43 AM
From XML into program variables: seek suggestions Frank Huddleston XML 0 November 16th, 2005 01:09 AM
Sending and Recieving XML from a VB.NET program gmackenz XML 0 October 10th, 2005 09:41 PM
Call VB Exe from VB Program jmss66 VB How-To 5 December 12th, 2004 11:17 AM
a xml program csc820203 C# 1 May 27th, 2004 05:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.