Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Getting Constraints


Message #1 by "Solutions 2000" <provb@s...> on Fri, 19 Oct 2001 13:34:31 +0300
There is a previous post on another topic where it pointed out that
someone could use the query SELECT * FROM
INFORMATION_SCHEMA.TABLE_CONSTRAINTS
I'll try it.
But since in my project I've used sql-dmo all the way I was thinking there
was a way I could do it through dmo without having to use recordsets and
connections. :/
I'll keep digging in msdn though!

Thanks for all your help
john

-----Original Message-----
From: bounce-pro_vb-478924@p...
[mailto:bounce-pro_vb-478924@p...]On Behalf Of Shreekar Joshi -
Yahoo
Sent: Saturday, October 20, 2001 8:03 AM
To: professional vb
Subject: [pro_vb] RE: Getting Constraints


Hi

A suggestion:
Whichever RDBMS u r using, has system tables which stores the info abt the
constraints. U can cionsult ur DBA for the info on this. and u can query
this info for the constraints.

Shreekar
----- Original Message -----
From: "John Walborn" <JWalborn@m...>
To: "professional vb" <pro_vb@p...>
Sent: Friday, October 19, 2001 10:26 PM
Subject: [pro_vb] RE: Getting Constraints


> You'll find that your fellow subscribers will let the question pass to
> someone with ideas on the subject. If you get no replies, it is not
because
> we are not willing to help. It's because you've asked a doozie. :)
>
> J
>
> -----Original Message-----
> From: Solutions 2000 [mailto:provb@s...]
> Sent: Friday, October 19, 2001 4:35 AM
> To: professional vb
> Subject: [pro_vb] Getting Constraints
>
>
>
> Hi
> A few weeks ago I had asked if it's possible to generate scripts of Views
> the smart way (hierarchically) so that you don't get those nasty 'object
> does not exist' errors when running your scripts in Query Analyser. I got
no
> answer so I wrote my own Class to do that and it works fine for views and
> stored procs. Now I want to script tables. I'd like to know if there is a
> way to find out if constraints exist? so that I can delete them, drop the
> table, re-build it, then re-build the constraint! At the same time, the
> script should move all the data to a temp table and return it, when the
> table has been re-built. All this is in a transaction! How can I find out
if
> constraints exist?
>
> TIA
>
> john k.

  Return to Index