Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database connectivity with JavaScript

Status
Not open for further replies.

finnoscar

Technical User
Aug 17, 2002
55
GB
Could anyone please tell me how to connect to an Access Database using IIS,ASP and JavaScript
 
try
<% @LANGUAGE=&quot;JavaScript&quot; %>

<%
var strConnect = &quot;DSN=YourDSNHere&quot;;
oConn=Server.CreateObject(&quot;ADODB.Connection&quot;);
oConn.Open(strConnect);

var strSQL = &quot;SELECT SomeField FROM myTable;&quot;;
var rsAd=oConn.Execute(strSQL);

Response.Write(&quot;First row is &quot;+ rsAd.Fields(&quot;SomeField&quot;) )

oConn.Close();
%>

You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top