Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Unique field in dbf table

2 posts in ODBC Last posting was on 2008-12-05 08:44:37.0Z
Col Posted on 2008-12-05 05:17:03.0Z
From: "Col" <txtngo@hotmail.com>
Newsgroups: Advantage.ODBC
Subject: Unique field in dbf table
Date: Fri, 5 Dec 2008 15:17:03 +1000
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 12.0.1606
X-MimeOLE: Produced By Microsoft MimeOLE V12.0.1606
NNTP-Posting-Host: 60.242.255.160
Message-ID: <4938b7c9@solutions.advantagedatabase.com>
X-Trace: 4 Dec 2008 22:10:33 -0700, 60.242.255.160
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!60.242.255.160
Xref: solutions.advantagedatabase.com Advantage.ODBC:1790
Article PK: 1133167

Hi all,

How do I set a field as unique in a dbf table with a cdx index.
The cdx has a unique property but it is only Claytons uniqueness as far as
reading the table is concerned.

Regards
Colin


Joachim Duerr (ADS) Posted on 2008-12-05 08:44:37.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Unique field in dbf table
Newsgroups: Advantage.ODBC
References: <4938b7c9@solutions.advantagedatabase.com>
Date: Fri, 5 Dec 2008 09:44:37 +0100
User-Agent: XanaNews/1.19.1.110
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 10.56.66.108
Message-ID: <4938e872@solutions.advantagedatabase.com>
X-Trace: 5 Dec 2008 01:38:10 -0700, 10.56.66.108
Lines: 17
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.56.66.108
Xref: solutions.advantagedatabase.com Advantage.ODBC:1791
Article PK: 1133168


Col wrote:

>How do I set a field as unique in a dbf table with a cdx index.
>The cdx has a unique property but it is only Claytons uniqueness as
>far as reading the table is concerned.

DBF does not support true unique indexes, they are only distinct
indexes. You can still insert records which produce the same key, but
they don't go into the index, only into the table.
For true uniqueness you need either use ADT or VisualFoxPro Format
(candidate key).

--
Joachim Duerr
Advantage Presales
Sybase GmbH
please don't reply via email