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

  • Home
  • SEARCH
  • 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 339781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:33:18+00:00 2026-05-12T10:33:18+00:00

ms-access is connecting to a local mysql database the following code returns an error:

  • 0

ms-access is connecting to a local mysql database

the following code returns an error:

Public Function run_sql(strSql As String)
On Error GoTo lblError
CurrentDb.Execute strSql, dbFailOnError
lblExit:
    Exit Function
lblError:
    MsgBox Err.Number & ": " & Err.Description
    Resume lblExit
End Function

strSql = “DELETE FROM tblUsersSubjects WHERE user_id=2007;” – i ran this statement it works perfectly, but access is giving me this error: 3086: Could not delete from specified tables

what is the cause of this error?

table structure is:

CREATE TABLE `tbluserssubjects` (
  `user_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `other` varchar(50) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

please note that i AM able perform the needed delete operation my using the shell, instead of access

  • 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-12T10:33:18+00:00Added an answer on May 12, 2026 at 10:33 am

    From within Access can you open your linked table, tblUsersSubjects, in datasheet view and edit or delete in datasheet view? If not, Access may be treating the connection to your MySql table as read-only. Try deleting the link (in Access; not the actual table in MySql). Then re-link the table in Access and make sure to tell Access which field (or combination of fields) to use as a primary key. If Access isn’t aware of a linked table’s primary key, the link will be read-only.

    After off-line discussions with Alex, I want to add to this answer:

    Access originally didn’t recognize what to
    use as a primary key, so your linked table was read-only from the Access side. I’ll guess that was because your CREATE TABLE statement didn’t
    include a primary key constraint. But I don’t actually know the
    details of how Access automagically identifies the primary key when linking to an
    external table. Perhaps, in the absence of an explicitly defined
    primary key, it might look for a field with Not Null and Unique
    constraints. But the CREATE TABLE statement didn’t include any unique constraints on your MySql
    table either.

    So when Access is not able to automagically guess the external table’s primary key, you must tell it which field (or fields) to use as the primary key … unless you want the linked table to be read-only from Access.

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

Sidebar

Ask A Question

Stats

  • Questions 154k
  • Answers 154k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Ideally, you would create each class only once and the… May 12, 2026 at 10:33 am
  • Editorial Team
    Editorial Team added an answer At this site, there is a nice example of MySQL… May 12, 2026 at 10:33 am
  • Editorial Team
    Editorial Team added an answer Re-using an exception from another Namespace At times I will… May 12, 2026 at 10:33 am

Related Questions

I have a Visual Studio 2008 solution with two projects (a Word-Template project and
I'm currently on a 4-person team tasked with the development and maintenance of a
Are there any object similar to ms-access forms in VB, .NET or other microsoft
In the middle of converting VB6 code to VB.NET, I need to replace the
I currently have an MS Access application that connects to a PostgreSQL database via

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.