Nonnoi Solutions
ASP/Export2Access Component
CH.1 Overview

      ASP/Export2Access is a server side COM component that allows web developers to export from DAO or ADO recordsets into MS-Access (MDB) file .

This component is shareware version without limitations on functionality or time, the only limitation is allows to export the 50 records. If you want to remove limitations then you have to register it for US$35.

ASP/Export2Access Component
CH.2 Features
ASP/Export2Access Component
CH.3 Installation
ASP/Export2Access Component
CH.4 Reference
FastExportAndShow(RS, TableName, MaxRecord)
Create new table/database from recordset and return MS-Access (MDB) file to browser.
Parameters:
  RS - The recordset object from ASP script.
  TableName - Name of the new table with in your Access database.
  MaxRecord - Set maximum set of export records (Use -1 for Empty table. The default value for MaxRecord is 0, which places no limits on the result set.).


FastExportToMDB(RS, FileName, TableName, MaxRecord)
Create new table/database from recordset and return MS-Access (MDB) file to browser.
Parameters:
  RS - The recordset object from ASP script.
  FileName - Export MDB file with this specified name.
  TableName - Name of the new table with in your Access database.
  MaxRecord - Set maximum set of export records (Use -1 for Empty table. The default value for MaxRecord is 0, which places no limits on the result set.).


GenHTTPHeader
Set to False if you want sets the content type/filename by your-self (Default = True).


CreateNewDatabase(DBName,OverWrite = False)
Create new MS-Access (MDB) file.
Parameters:
  DBName - creates a new MDB file with this specified name.
  OverWrite - Set the OverWrite property to True if you are going to replace old page files with new ones. The default value for this property is False.


AddNewTable(DBName, TableName, RS, MaxRecord)
Create new table from recordset.
Parameters:
  DBName - The name of Access database.
  TableName - Name of the new table with in your Access database.
  RS - The recordset object from ASP script.
  MaxRecord - Set maximum set of export records (Use -1 for Empty table. The default value for MaxRecord is 0, which places no limits on the result set.).


ShowFile(DBName,ShowAsName)
Method to return MS-Access (MDB) file to browser.
Parameters:
  DBName -The name of Access database.
  ShowAsName - return MDB file to browser with this specified name (Option).


CompactDatabase(DBName)
Compact and Repair MS-Access (MDB) file.
Parameters:
  DBName - compact and repair MDB file with this specified name.


DeleteTable(DBName,TableName)
Drop Table from MS-Access (MDB) file.
Parameters:
  DBName - drop table from this MDB file.
  TableName - drop table named by TableName.


DeleteDatabase(DBName)
Delete the MS-Access (MDB) file.
Parameters:
  DBName - deletes the MDB file named by FileName from the disk.


GetTempFileName
calls GetTempFileName to get the name of a temporary file.

RegisterName
if you already registered this product, input your name (company name or customer name) here.
** you must set this value before call AddNewTable.

RegisterKey
if you already registered this product, input your registration key here.
** you must set this value before call AddNewTable.


ASP/Export2Access Component
CH.5 Example
ASP : One step to export recordset to MDB file.
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\demos.mdb"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select * from customer" , conn
Set Obj = Server.CreateObject("nonnoi_ASPExport2Access.ASPExport2Access")

Obj.FastExportToMDB rs, "c:\newdata.mdb", "Test", 0

rs.Close
conn.Close

set rs = nothing
set Obj = nothing
%>


ASP : Export recordset to MDB file an return to browser.
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\demos.mdb"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select * from customer" , conn
Set Obj = Server.CreateObject("nonnoi_ASPExport2Access.ASPExport2Access")

Obj.GenHTTPHeader =False
'Sets the content type
Response.ContentType = "application/octet-stream"
'Specify filename for download
Response.AddHeader "Content-Disposition", "attachment; filename=ExportResults.MDB"

Obj.FastExportAndShow rs, "Test", 0

rs.Close
conn.Close

set rs = nothing
set Obj = nothing
%>


ASP : Export recordset to new MDB file.
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\demos.mdb"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select * from customer" , conn
Set Obj = Server.CreateObject("nonnoi_ASPExport2Access.ASPExport2Access")

DBTemp = Obj.GetTempFileName
Obj.CreateNewDatabase DBTemp,True
Obj.AddNewTable DBTemp, "Test", rs, 0
Obj.ShowFile DBTemp
Obj.DeleteDatabase DBTemp

rs.Close
conn.Close

set rs = nothing
set Obj = nothing
%>


ASP (Registered User):
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\demos.mdb"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select * from customer" , conn
Set Obj = Server.CreateObject("nonnoi_ASPExport2Access.ASPExport2Access")

DBTemp = Obj.GetTempFileName
Obj.CreateNewDatabase DBTemp,True
Obj.RegisterName = "Nonnoi"
Obj.RegisterKey = "0123456-789"
Obj.AddNewTable DBTemp, "Test", rs, 0
Obj.ShowFile DBTemp
Obj.DeleteDatabase DBTemp

rs.Close
conn.Close

set rs = nothing
set Obj = nothing
%>


ASP/Export2Access Component
CH.6 Update & Order
 Click here for prices and discount information.
 Click here for product news & information.
 Click here for product support or any comment.