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 516427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:43:49+00:00 2026-05-13T07:43:49+00:00

Due to circumstances beyond my control tm , I am using sqlalchemy with an

  • 0

Due to “circumstances beyond my control”tm, I am using sqlalchemy with an MS Access backend. I’m having an issue that the following code:

def delete_imports(self, files_imported_uid):
    table_name = 'my_table'
    delete_raw = self.meta.tables[table_name].delete()
    self.engine.execute(delete_raw.where(
        self.meta.tables[table_name].c.files_imported_uid == files_imported_uid)
        )

throws a “File sharing lock count exceeded.” error with large tables. The statement generated is just:

DELETE FROM my_table WHERE my_table.files_imported_uid = ?

with a parameter of the uid. The statement is then executed via pyodbc. MSDN provided some suggestions to get around the problem, before informing me that they won’t work if the database is on a Novell NetWare server, which it is.

Is there a known work around that I can use (preferably at the sqlalchemy layer), or do I need to create some ugly hack that selects the top 9,000 records at a time to delete and loops until finished?

  • 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-05-13T07:43:49+00:00Added an answer on May 13, 2026 at 7:43 am

    Having looked into this, sqlalchemy can’t support ‘Top’ on deletes (eliminating the simple option of ordering and deleting the top 9000 each time till the whole delete is finished) so I gave in and just deleted each line individually. Not ideal, but given that:

    1) This operation is only performed once a month
    2) Deletes are pretty quick anyway
    3) I’m the main user of the application…

    it didn’t seem worth coding a more efficient work around.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the jquery.cjobjectScaler plugin ( link text ) and due to circumstances beyond
Due to company constraints out of my control, I have the following scenario: A
I've got two datasources, one Oracle and one Sql Server. Due to circumstances that
Due to the lack of clientaccesspolicy.xml, there appears to be problems with using Amazon
Due to lack of capital and time we are having to do our game
I recently switched my hosting provider and due to the time zone that the
Java process control is notoriously bad - primarily due to inadequate support by the
I have a c++ dll which I need to debug. Due to the circumstances
I have an Access 2007 application (previously in Access 2003) that is running into
Due to 0 responses, I'm guessing that my LEFT JOIN question got into too

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.