-
I finally got it!
Created a macros named "InsertDoors" with RunSQL "INSERT INTO ACS_Doors ( JobName, Location, DoorName, DefaultID, DefaultLabel ) SELECT ASPTable.JobName, ASPTable.Location, ASPTable.Door, ASPTable.DefaultID, ASPTable.DefaultLabel
FROM ASPTable;" and "DeleteASP" with RunSQL "DELETE ASPTable.* From [ASPTable];
and executed it from my ASP page with this code:
[vba]
<%
Dim DbPath
Dim objAccess
Dim NumDoors
Dim macroName
Dim macro2Name
%>
<% Set Session ("objAccess") = Server.CreateObject("Access.Application")
DbPath = "/dbfolder/dbname.mdb"
Session("objAccess.Visible") = True
Session("objAccess").OpenCurrentDatabase Server.MapPath(DbPath)
macroName = "InsertDoors"
macro2Name = "DeleteASP"
NumDoors = Request.Form("NumDoors")
Session("objAccess").DoCmd.RunMacro macroName, NumDoors
Session("objAccess").DoCmd.RunMacro macro2Name
Session("objAccess").CloseCurrentDatabase
%>
<% Set Session("objAccess") = Nothing%>[/vba]
So Gibbs, thanks so much for the idea of using the temp table approach, it's working beautifully!

Bart
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules