Home » Posts tagged "Access"

Archive for the 'Access' Tag

Classic ASP Connection String

Sql connection ************************ Dim connStr connStr = “Provider=SQLOLEDB;Data Source=my-sql-server;UID=MyUsernmame; PWD=MyPassword; database=MyDatabase;” Set objConn = Server.CreateObject(“ADODB.Connection”) objConn.ConnectionTimeOut = 30 objConn.ConnectionString = connStr objConn.Open SET objRS = Server.CreateObject(“ADODB.RecordSet”) objRS.Open “SELECT * FROM my_table ORDER BY type asc”,objConn,1,2 ‘do some sql work objRS.Close SET objRS = Nothing Access 2007/2010 connection ************************ DIM objConn, objRS, dsn, dbPath dsn = […]

Microsoft.ACE.OLEDB.12.0 provider is not registered

Basically, if you’re on a 64-bit machine, IIS 7 is not (by default) serving 32-bit apps, which the database engine operates on. So here is exactly what you do: 1) ensure that the 2007 database engine is installed, this can be downloaded at: http://www.microsoft.com/downloads/details.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en 2) open IIS7 manager, and open the Application Pools area. On […]

Random db record generating script

Generate random db record output. This is classic asp script. VB.NET version is coming soon < % @ Language=”VBScript” %> < % Option Explicit %> < !DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en”> <head runat=”server”> <title> <link href=”Styles/Site.css” rel=”stylesheet” type=”text/css” /> </head> <body> <div class=”page”> <div class=”main”> <div style=”width: 900px; text-align: […]