473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

case insensitive

2
I have created a table with 2 columns one being a primary key of varchar(1).
I successfully insert a record with a value of 'A' but I am not able to insert another row with a value of lower case 'a', I get the following error:

RESULT: Error - The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.

Is there a way to allow both upper and lower case character be inserted in my example?
Jan 4 '08 #1
3 4427
missinglinq
3,532 Expert 2GB
As you discovered, Access is case insensitive! I can't really imagine a practical way to make this work, nor, to be honest, can I imagine why you would want to, especially for a Primary Key! The whole point of a PK is for it to be absolutely unique! If you worked some kind of hack using ACSII values, you'd have to differentiate between the two (and presumably do this for all other letters) in every aspect of the database! And how would you ever be sure whether the user meant A or a when the letter was entered? I can't conceive of any validation that would work.

Welcome to TheScripts!

Linq ;0)>
Jan 4 '08 #2
ADezii
8,834 Expert 8TB
I have created a table with 2 columns one being a primary key of varchar(1).
I successfully insert a record with a value of 'A' but I am not able to insert another row with a value of lower case 'a', I get the following error:

RESULT: Error - The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.

Is there a way to allow both upper and lower case character be inserted in my example?
Is there a way to allow both upper and lower case character be inserted in my example?
Everything that linq stated is solid advice, but if for some odd reason you needed a 1 Alpha Character Field and need to differentiate between 'A' and 'a', you could always store the ASCII Character of the Field (A = 65 and a = 97), and make it the Primary Key Field. Of course you would have to handle the conversions to and from the Table.
Jan 5 '08 #3
jnikho
2
Thank you missinglinq and ADezii for your posts.

I actually do need to differentiate between lower and upper case letters as per business requirement. The ASCII representation sounds like a good solution.

Thanks again.
Jan 7 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

32
by: Elliot Temple | last post by:
Hi I have two questions. Could someone explain to me why Python is case sensitive? I find that annoying. Also, why aren't there multiline comments? Would adding them cause a problem of some...
5
by: Madjid Nasiri | last post by:
Hi, I am basic in oracle. My Old programs write with Delphi and Databases: Access, Paradox, MySQL, Microsoft SQL. I write my code (SQL code) case-insensitivae, but now i need use oracle database....
12
by: Relaxin | last post by:
Is there a way to make Postgresql case-INSENSITIVE? Thanks
2
by: Tom | last post by:
Hi, Our development team is adding DB2 8.1 compatibility to our existing application which currently supports SQLServer 2000. Our code is written to take advantage of SQLServer's ability to ...
14
by: Christian Sell | last post by:
Hello, I am running into a problem with PGs case sensitivity with regard to column and table names. I am using program components that require the object names returned from database metadata...
13
by: Tom Anderson | last post by:
Afternoon all, MacOS X seems to have some heretical ideas about the value of case in paths - it seems to believe that it doesn't exist, more or less, so "touch foo FOO" touches just one file,...
1
by: benhoefer | last post by:
I have been searching around and have not been able to find any info on this. I have a unique situation where I need a case sensitive map: std::map<string, intimap; I need to be able to run a...
4
by: bb | last post by:
Hi, void fun(const std::map<std::string,int>& m1) { // How to make a case insensitive search of this map without making a copy? } cheers.
6
by: Derik | last post by:
Okay, I THINK this is a PHP question... I've been mucking with PHP for awhile now, but just recently I've been poking at some ajax stuff, and I ran into something confusing; my Queries were...
0
by: Ethan Furman | last post by:
Maric Michaud wrote: Actually, the OP said: -- So you're saying to ensure that stage_map's keys are initially -- lower-case to begin with? Well, I can't do this either since the -- *case of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.