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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:22:11+00:00 2026-05-18T08:22:11+00:00

I created an MS Access table using the following code: tbl := Database.CreateTableDef(‘English’, 0,

  • 0

I created an MS Access table using the following code:

  tbl := Database.CreateTableDef('English', 0, '', '');
  try
    fld := tbl.CreateField('ID', dbLong, 0);
    fld.Attributes := dbAutoIncrField + dbFixedField;
    tbl.Fields.Append(fld);

    fld := tbl.CreateField('Content', dbText, 255);
    fld.Required := true;
    fld.AllowZeroLength := false;
    tbl.Fields.Append(fld);

    Database.TableDefs.Append(tbl);

    idx := tbl.CreateIndex('PrimaryKey');
    idx.Fields.Append(idx.CreateField('ID', EmptyParam, EmptyParam));
    idx.Primary := True;
    idx.Unique := true;
    tbl.Indexes.Append(idx);

    idx := tbl.CreateIndex('IX_Content');
    idx.Fields.Append(idx.CreateField('Content', EmptyParam, EmptyParam));
    idx.Primary := false;
    idx.Unique := true;
    tbl.Indexes.Append(idx);
  finally
    tbl := nil;
  end;

This works fine until I try to insert the two strings ‘Field type’ and ‘Field Type’ into this table. I get an error telling me that the unique index restricts me from doing that. As you can see they only differ in the case of the second word. Since I did not explicitly make the index case insensitive (I wouldn’t even know how to do that), I don’t quite understand why this happens. Are indices on text fields always case insensitive in MS Access? If not, what am I doing wrong?

  • 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-18T08:22:11+00:00Added an answer on May 18, 2026 at 8:22 am

    Access Jet databases are fundamentally case insensitive. That is your problem. As far as I know there is no way to make an Access index case sensitive.

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

Sidebar

Related Questions

I have an Access database in which I drop the table and then create
I have created a Data Access Layer using .NET. Everywhere that I update a
I have created a report in MS Access report and write some VBA code
I created a simple Caching Data Access Layer that has caching using the Enterprise
I have the following code: CREATE TABLE Faculty ( FacSSN text(9) primary key, FacFirstName
I've used following code to generate database creation script Configuration configuration = new Configuration();
I am trying to import email communication into a database table using Bulk Insert
I am using OCCI to connect Oracle and C++. When i try to access
I am trying to restore the database file(backup.sql) using c# by the following method...
I want to programmatically create a new column in an MS Access table. I've

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.