473,386 Members | 1,706 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,386 software developers and data experts.

How to remove a relation in access using .Net 2.0 C#

I have a table which has a foreign key contraint to
another table. I want to delete this relation using a ALTER Table statement (like ALTER TABLE table2 drop CONSTRAINT...) or via ADO.Net
2.0 ?

I do not know the correct ALTER Table syntax. Do I have to pass the
name of the contraint ? How do I find the name (even in the GUI/
RelationShip diagram I can not find any name) ?

Thanx for your help

David Plsek
Jan 17 '11 #1
1 2126
ADezii
8,834 Expert 8TB
There is a much simpler Method for Deleting a Relation in Access:
Expand|Select|Wrap|Line Numbers
  1. CurrentDb.Relations.Delete "<Relation Name>"
Expand|Select|Wrap|Line Numbers
  1. 'The following Code will Delete the Relationship between the Categories
  2. and Products Table of the Northwind Sample Database:
  3. CurrentDb.Relations.Delete "CategoriesProducts"
Jan 17 '11 #2

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

Similar topics

12
by: pake2007 | last post by:
Need To Remove Ms-access Bug#3420 Please Help- Every Time I Press To Move From One Record To Another A Get A Message Box (3420) How Can I Remove This From Popping Up Every Time? THANKS
1
hariharanmca
by: hariharanmca | last post by:
How to Shift or Copy Data from Sqlserver to MS Access using Stored procedure I am passing the clint MS Access file path in that i want to insert or update data in that MS Access file using...
8
by: fniles | last post by:
Can I change the connection time out in VB.Net 2003 and MS Access (using OLEDbConnection) ? When I use Connect Timeout = 60 in the connectionstring, I get an error "Multiple-step OLE DB operation...
3
by: ofilha | last post by:
I need to format a column in excel but would like to do it from Access using VB. I have hacked around and found a few ways to get to the workbook but have a problem getting to the sheet i want. But,...
1
by: vinodkus | last post by:
dear sir/madam Can any one help me how to connect ASP and MS ACCESS using FILE DSN. Thanks in Advance vinod
18
by: hotflash | last post by:
Hi Mark et All, I understand that you created a very professional document and a similar issue forum out there regarding to Inserting the checkbox value into MS Access using ASP however; I am so...
2
by: shivapadma | last post by:
is it possible to access MS ACCESS using c++? if yes,then how can i access? is it similar to java language? i.e, 1.loading 2.connecting 3.using
4
by: macca | last post by:
hi, Does anybody know if it's possible to log into Outlook Web Access using PHP? I mean, if I have the username, password and email address I need to have a link that opens directly into...
6
by: =?Utf-8?B?QmVu?= | last post by:
Hi all, Is there any good resource online that you can share with me about programming Access using C#. I am trying to get my feet wet with C# and vs2008. I tried looking at kb317114, it...
2
by: yatinbvn | last post by:
hi how to remove file access permission in j2me? when i test my application in device or simulator ( i use fileconnection api) it start with popup (popup with "Allow application to open "some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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...

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.