<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Proverbial Monkey &#187; JavaScript</title>
	<atom:link href="http://www.proverbialmonkey.co.uk/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.proverbialmonkey.co.uk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 31 Jul 2010 09:37:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Connecting to a MS Access Database using JavaScript</title>
		<link>http://www.proverbialmonkey.co.uk/connecting-to-a-ms-access-database-using-javascript/</link>
		<comments>http://www.proverbialmonkey.co.uk/connecting-to-a-ms-access-database-using-javascript/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 16:23:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[intranets]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MS Access]]></category>

		<guid isPermaLink="false">http://www.proverbialmonkey.co.uk/connecting-to-a-ms-access-database-using-javascript/</guid>
		<description><![CDATA[I have been searching for a technique to connect to a MS Access database solely using JavaScript for some time now. Until recently I have been totally out of luck. Before I go on and reveal the method behind the madness let me make a few things crystal clear! This is 100% advised against for [...]]]></description>
			<content:encoded><![CDATA[<p>I have been searching for a technique to connect to a MS Access database solely using JavaScript for some time now. Until recently I have been totally out of luck.</p>
<p>Before I go on and reveal the method behind the madness let me make a few things crystal clear!</p>
<p><strong>This is 100% advised against for anything other than in-house work e.g. Intranets as it is not a secure method.</strong></p>
<p>So anyway here&#8217;s the code to achieve it. (line wraps marked »)</p>
<pre><code>
var conn = new ActiveXObject("ADODB.Connection");
var rs = new ActiveXObject("ADODB.Recordset");
conn.ConnectionTimeout = 15;
conn.CommandTimeout = 15;
var connStrng = "Provider=Microsoft.Jet.OLEDB.4.0; »
Data Source=database.mdb; »
Persist Security Info=False"; // remember to escape \ if needed.
conn.open(connStrng);
rs.open("SQL Statement", conn);
var fields=new Array();
var i=0; while(!rs.eof) {
   var  = fields[i]=rs.fields("Field Name").value;
   i++; rs.moveNext();
};
rs.close();
conn.close();
</code></pre>
<p>Hope it helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.proverbialmonkey.co.uk/connecting-to-a-ms-access-database-using-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
