Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8294919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:24:07+00:00 2026-06-08T14:24:07+00:00

I have a ASP page where a user will upload a excel file. After

  • 0

I have a ASP page where a user will upload a excel file. After the file is successfully uploaded I want to take the rows in the REGION tab and insert them into an MS Access 2007 table. Below is the code I used and I am getting this error. Can I use the recordset update with the Microsoft.ACE.OLEB.12.0 provider? Is there a better way to do this?
ADODB.Recordset error ‘800a0cb3’

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.

Set cnnExcel = Server.CreateObject("ADODB.Connection")
cnnExcel.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
                "Data Source=" & strExcelFile & ";" & _
                    "Extended Properties=" &  Chr(34) & "Excel 12.0 Xml;HDR=Yes;IMEX=1" & Chr(34) & ";" 
Response.Write "Excel connection opened<BR>"

' Load ADO Recordset with Excel Data
Set rstExcel = Server.CreateObject("ADODB.Recordset")
rstExcel.Open "Select * from [REGION$]", cnnExcel, adOpenStatic 
Response.Write "Excel Recordset loaded<BR>"

' Open Access Connection
Set cnnAccess = Server.CreateObject("ADODB.Connection")
cnnAccess.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & strAccessFile & ";Persist Security Info=False;" 
Response.Write "Access connection opened<BR>"
Const adOpenStatic = 1
Const adLockOptimistic = 3
Const adCmdText = &H0001
' Load ADO Recordset with Access Data
Set rstAccess = Server.CreateObject("ADODB.Recordset")
rstAccess.Open "REGION", cnnAccess, adOpenStatic, adLockOptimistic, adCmdTable
Response.Write "Access Recordset loaded<BR>"

' Synchronize Recordsets and Batch Update
Do Until rstExcel.EOF

        ' .AddNew
        For each field in rstExcel.Fields
            If field.Name = "% Over/Under" Then
                rstAccess.AddNew field.Name,0
            Else
                rstAccess.AddNew field.Name,field.Value
            End If
        Next

    rstExcel.MoveNext
Loop
rstAccess.UpdateBatch
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:24:09+00:00Added an answer on June 8, 2026 at 2:24 pm

    Thank you Hans, Tim and Remou. I followed this example Using INSERT INTO to write data into access database

      ' Open Access Connection
    Set cnnAccess = Server.CreateObject("ADODB.Connection")
    cnnAccess.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & strAccessFilePath & ";Persist Security Info=False;"   
    cnnAccess.Execute "DELETE * FROM REGION"
    'Open Excel Connection
    Set cnnExcel = Server.CreateObject("ADODB.Connection")
    cnnExcel.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
                    "Data Source=" & strExcelFilePath & ";" & _
                        "Extended Properties=" &  Chr(34) & "Excel 12.0 Xml;HDR=Yes;IMEX=1" & Chr(34) & ";" 
    Response.Write "Excel connection opened<BR>"
    cnnExcel.Execute "INSERT INTO REGION IN 'C:\inetpub\wwwroot\FolderName\App_Data\AccessFileName.accdb' " & _
                    "Select col1,col2,col3,col4" & _
                   "from [REGION$]"
    
    
    ' Clean up    
    cnnExcel.Close
    Set cnnExcel = Nothing
    cnnAccess.Close
    Set cnnAccess = Nothing
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET (3.5) page that allows a user to upload an Excel
I have a C# ASP.NET web page with an xml file upload form. When
I have a user control that will render a textbox or file upload. I
I have an ASP.NET home page where user provides his login ID. Depending on
I have an ASP.Net page, which displays a list of options to the user.
I have an asp.net web page (C# 2008) where the user would enter an
asp c# i have a page where user selects an item and its quantity
I have a transaction button on my asp.net page. If the user clicks on
I have a asp.net/c# web app. When do user leave a certain page, I
I'm working on a page that will allow a user to upload a photo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.