Hi Tom,
It is not a bug. The name of index is a string - "#999999"
Next code is beta solution.
--------------------------------------
SET VAR vTableID INTEGER
SELECT SYS_TABLE_ID INTO vTableID ivTableID FROM SYS_TABLES +
WHERE SYS_TABLE_NAME = 'Table_Name'
SET VAR vConstraintName TEXT
SELECT SYS_INDEX_NAME INTO vConstraintName IvConstraintName +
FROM SYS_INDEXES WHERE SYS_TABLE_ID = .vTableID +
AND SYS_COLUMN_NAME = 'Column_Name'
SET VAR vCommand TEXT = +
('ALTER TABLE Table_Name DROP CONSTRAINT' & .vConstraintName)
&vCommand
--
CLEAR VAR vTableID,ivTableID,vConstraintName,IvConstraintName,vCommand
-----------------------------------------------
[EMAIL PROTECTED]
(503) 253 4875
Konstantin Gudjev
>From: Tom Grimshaw <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: DROP CONSTRAINT
>Date: Sun, 14 Jul 2002 20:11:19 -0700
>
>G'day.
>
>I have a foreign key constraint numbered #1210 on the column EntityID in
>the table TranHeader. Without success I have tried the following ways to
>drop it and received the following error messages:
>
>DROP INDEX #1210 -ERROR- #1210 not found ( 46)
>DROP CONSTRAINT #1210 - Syntax is incorrect for the command
>DROP (2045)
>DROP INDEX TranHeader.EntityID -ERROR- INDEX not found ( 46)
>DROP INDEX EntityID IN TranHeader -ERROR- INDEX not found ( 46)
>
>Doing a search of the R:BASE 6.5++ on-line help says that DROP CONSTRAINT
>is a valid command but it is not in the command index.
>
>I need to do this programmatically rather than through RBDefine as it will
>be going to my clients as part of a large update.
>
>Before I report it as a bug:
>1. Am I using the correct syntax?
>2. Do you have an alternate way of programmatically dropping a foreign key?
>3. If you are using the latest patch (R:BASE 2000 1.855xRT03) could you
>test dropping a foreign key programmatically and verify that it is not just
>my computer and I having a bad KEY day?
>
>Warmest regards,
>
>
>Tom Grimshaw
>coy: Just For You Software
>tel: 612 9552 3311
>fax: 612 9566 2164
>mobile: 0414 675 903
>
>post: PO Box 470 Glebe NSW 2037 Australia
>street: 3/66 Wentworth Park Rd Glebe NSW 2037
>
>email: [EMAIL PROTECTED]
>web: www.just4usoftware.com.au
>
>"... the control of impulse -- is the first principle of civilization."--
>Will Durant,
>Pulitzer Prize winning philosopher, writer and historian
>
>the most needed product in the world can be found at
>www.thewaytohappiness.org
>
>This email and any files transmitted with it are confidential to the
>intended recipient and may be privileged. If you have received this email
>inadvertently or you are not the intended recipient, you may not
>disseminate, distribute, copy or in any way rely on it. Further, you should
>notify the sender immediately and delete the email from your computer.
>Whilst we have taken precautions to alert us to the presence of computer
>viruses, we cannot guarantee that this email and any files transmitted with
>it are free from such viruses.
>
>================================================
>TO SEE MESSAGE POSTING GUIDELINES:
>Send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: INTRO rbase-l
>================================================
>TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: UNSUBSCRIBE rbase-l
>================================================
>TO SEARCH ARCHIVES:
>http://www.mail-archive.com/rbase-l%40sonetmail.com/
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/