Truncate table being referenced by a foriegn key

From: Abhishek Srivastava (abhishek-srivastava_at_nospam.net)
Date: 03/03/04


Date: Wed, 03 Mar 2004 17:07:44 +0530

Hello All,

When I try to truncate the tables in my database I get error message

Cannot truncate table 'bt_Bug' because it is being referenced by a
FOREIGN KEY constraint.

How can I truncate all the tables I tried to do this in many possible
order of all tables... but I get this error always for one table or other.

Thanks for your help in advance.

regards,
Abhishek.



Relevant Pages

  • Re: Saved query doesnt select all info in Memo field.
    ... error message and implemented some property that the error message ... You cannot sort/group on memo fields. ... Access truncate the fields at 255 characters so that it can ...
    (microsoft.public.access.queries)
  • Re: how to truncate automatically?
    ... I know i can check the lenght in code-behind, but is there no way to let asp.net truncate inputted data automatically and not let it stop the application and show that error message? ... If e.g. your database field is varchar, setting the MaxLength also to 50 will prevent your users from typing more text than will fit in the database. ... The first option is preferable, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: cant click on hypertext link in Outlook, system hangs up
    ... When you post an error message, do NOT truncate it or paraphrase it. ... Brian Tillman [MVP-Outlook] ...
    (microsoft.public.outlook.general)
  • Re: Truncate table being referenced by a foriegn key
    ... The error message pretty much speaks for itself. ... to a table, you cannot use TRUNCATE TABLE, even if the referencing table has ... "Abhishek Srivastava" wrote in message ...
    (microsoft.public.sqlserver.programming)
  • Foreign Key Constraint
    ... >command a viable alternative. ... Not really you will get the same error message. ... Truncate is much faster than a delete. ... "Denial ain't just a river in Egypt." ...
    (microsoft.public.sqlserver.server)

Loading