473,791 Members | 2,881 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DDL syntax for dropping relation

ALTER TABLE [tblOrders_63005] DROP CONSTRAINT
[{09D4E203-99A0-47DB-A424-751E8A5BFFFE}];

Is this syntax correct?

The error I'm getting is:

Error Number 3199: Could not find reference.

I tried it without the curly braces, but no luck.
Nov 13 '05 #1
2 2038
deko wrote:
ALTER TABLE [tblOrders_63005] DROP CONSTRAINT
[{09D4E203-99A0-47DB-A424-751E8A5BFFFE}];

Is this syntax correct?

The error I'm getting is:

Error Number 3199: Could not find reference.

I tried it without the curly braces, but no luck.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Easiest is to go into the Relationship window & just delete the
relationship. If you create relationships using DDL use a more human
readable name.

The syntax is correct. Make sure you are using the correct table. Make
sure that GUID is the actual name of the relationship. You might try
removing the square brackets and leave the curly braces. Or, remove
both the curly braces & the square brackets.
--
MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQwJNk4echKq OuFEgEQKMiACeO9 AHfO8b/JnLQPbYJ1xgi7Zl Nc8AoOzS
Xvhnl52HuU2D26M W4r6C1ADm
=ybVq
-----END PGP SIGNATURE-----
Nov 13 '05 #2
> Easiest is to go into the Relationship window & just delete the
relationship.
The scenario I'm working with is when users import multiple tables from
another database that contain relationships between each other, and those
relation names are potentially the same as existing relations - in which
case the relations are not visible in the Relationship window (users don't
have access to the Relationship window anyway). The reason I need to drop
the relations between the imported tables is so I can manipulate those
tables (drop columns, etc.) and massage the data so it can be inserted
elsewhere.
If you create relationships using DDL use a more human
readable name.
Access decides what names to give these relationships (and I never know how
many exist until runtime).
The syntax is correct. Make sure you are using the correct table. Make
sure that GUID is the actual name of the relationship. You might try
removing the square brackets and leave the curly braces. Or, remove
both the curly braces & the square brackets.


I tried that and a number of other things - no luck. When it comes to
working with Relations, I think DAO is the way to go.

Here's what I got working:

If db.Relations.Co unt > RELCOUNT Then
'RELCOUNT is a constant that is the number of
'known relations in the production database

db.Execute "DELETE * FROM tblImexRelation s;"
Set rstRel = db.OpenRecordse t("tblImexRelat ions")
For Each rel In db.Relations
rstRel.AddNew
rstRel!RelName = rel.Name
rstRel.Update
Next

Set rstImexRel = db.OpenRecordse t("qryImexRelat ions")
'qryImexRelatio ns retrieves all Relation names in
'tblImexRelatio ns that are not known Relations in the
'production database

Do While db.Relations.Co unt <> RELCOUNT
i = i + 1
rstImexRel.Move First
Do While Not rstImexRel.EOF
strRel = rstImexRel!RelN ame
db.Relations.De lete strRel
db.Relations.Re fresh
rstImexRel.Move Next
Loop
If i = 10 Then Exit Do
Loop

I've noticed it can take a few swipes before the relation is deleted. But
if it's not gone in 10 tries, something's wrong.
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
34255
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
14
2317
by: Sandy Norton | last post by:
If we are going to be stuck with @decorators for 2.4, then how about using blocks and indentation to elminate repetition and increase readability: Example 1 --------- class Klass: def __init__(self, name):
28
2399
by: Paul McGuire | last post by:
Well, after 3 days of open polling, the number of additional votes have dropped off pretty dramatically. Here are the results so far: Total voters: 55 (with 3 votes each) Votes for each choice or group of choices: Any J 81 J2 78 Any C 40 C1 29 Any D 9
31
2443
by: Brian Sabbey | last post by:
Here is a pre-PEP for what I call "suite-based keyword arguments". The mechanism described here is intended to act as a complement to thunks. Please let me know what you think. Suite-Based Keyword Arguments ----------------------------- Passing complicated arguments to functions is currently awkward in Python. For example, the typical way to define a class property winds up polluting the class's namespace with the property's get/set...
5
5613
by: GitarJake | last post by:
Hello all, Newbie here. SQL 2000, Windows 2000 I'm trying to alter tables in my SQL DB using statements like the following: /* AD_GROUPS */ alter table AD_GROUPS alter column AD_GROUP_NAME nvarchar(64)not null go
8
1787
by: Ike | last post by:
I am hoping someone can help me with the proper syntax for this. I have an attribute, called, say "name," such that: <set name="something">thename</set> However, the value for name, is something that is unknown, something within tags itself. So, for example, the tag <star index="1"/> might be "something." How then can I express, or more precisely, what would be the proper syntax
177
7099
by: C# Learner | last post by:
Why is C syntax so uneasy on the eye? In its day, was it _really_ designed by snobby programmers to scare away potential "n00bs"? If so, and after 50+ years of programming research, why are programming languages still being designed with C's syntax? These questions drive me insane. Every waking minute...
1
1649
by: Prabu Subroto | last post by:
Dear my friends... I want to drop a rule but I get an error message. Could you tell me my I can not drop (delete) the rule? Thank you very much in advance. ps: Here is my try underbelow: postgres@patrix:~> psql kv
2
3921
by: Skidder1 | last post by:
Hi all, Has anyone ever had an issue in MS Access 2003 where the primary key of a table has just disappeared overnight? The database is on a server file share, is in native MS Access and is split into code/data files but is not unusual in any way from any other I have seen. The only differenbce (for me) is this is the first 2003 dB I have come across, normally I develop with 97 or 2K. I have scanned various group histories to see if...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10426
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.