Skip to main content

Work with an XML file as if it was a database table

Work with an XML file as if it was a database table

There is a cool XML database client (Open-Source ADO.NET XML Provider -- WilsonXmlDbClient v1.0)written by Paul Wilson that allows you to work directly with a well formed XML file as if it was a database. Here we will use this XML database client to code some simple examples using 'SELECT', 'INSERT', 'UPDATE', and 'DELETE' SQL commands directly against an XML file. To present and edit data we are going to use a DataList server control. I liked the article - Use the DataList Control to Present and Edit Data..., and I wanted to use it in this example. Also, we are going to use a couple of nifty objects like ViewState and SessionState. ViewState is used to track the value between post backs and SessionState is used to store data specific to a single client within a Web application on the server.
Post a Comment

Popular posts from this blog

Compact and Repair an Access Database. Add Ref. to : AdoDb, Jro

< ?xml version="1.0" encoding="utf-8" ?>

using ADODB;
using JRO;
using System.Configuration;
using System.Data.OleDb;
using System.IO;

public class CompactAndRepairAccessDb : System.Windows.Forms.Form
private System.ComponentModel.Container components = null;
private JRO.JetEngine jro;
private System.Windows.Forms.Button btnConfirm;
private System.Windows.Forms.TextBox tbxOriginalDbSize;
private System.Windows.Forms.TextBox tbxCompactedDbSize;
private OleDbConnection cnn;

public CompactAndRepairAccessDb() {

FileInfo fi = new FileInfo( ConfigurationSettings.AppSettings["PathOriginal"] );
int s = Convert.ToInt32( fi.Length/1000 );
this.tbxOriginalDbSize.Text = s.ToString() + " kb";

private void btnConfirm_Click(object sender, System.EventArgs e) {
// First close all instances of the database

VBScript to Automate login into gmail

Dim IE
Dim crtScreen
Set IE = CreateObject("InternetExplorer.Application")
USERNAME = "saudaziz"

With IE
.navigate ""
End With

'wait a while until IE as finished to load
Do while IE.busy
set WshShell = WScript.CreateObject("WScript.Shell")
Do While UCase(IE.Document.readyState) <> "COMPLETE"
WScript.Sleep 100
set WshShell=nothing
IE.document.all.Item("Email").value = USERNAME
IE.document.all.Item("pASSWD").value =pASSWORD
Set IE = Nothing