Reminds me of an old T-Shirt from Calc class with the text of a solved
problem coming down to "1=0", and the moral of the story was, "Don't Drink
and Derive."
Steve Holak
Senior Software Architect
Brokerage Concepts IS Dept.
610-491-4879
email: [EMAIL PROTECTED]
Henk de Koning
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
OM> cc:
Sent by: dotnet Subject: Re: [DOTNET] Checking
Existance and Creating SqlServer
discussion Objects
<[EMAIL PROTECTED]
VELOP.COM>
04/25/2002 03:13
AM
Please respond to
dotnet discussion
A very old trick to do this (and get sort of schema info without using
schema support) is:
select * from table where 1 = 2
-- Henkk
----- Original Message -----
From: "Thomas Tomiczek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 25, 2002 7:57 AM
Subject: Re: [DOTNET] Checking Existance and Creating SqlServer Objects
> Yes, there is - you can even do it in the create SQL Statement. At least
> with SQL Server 2000. Otherwise not really.
>
> Well, the last isue would be a select *, but then you run the chance of
> getting all the data dumped.
>
> SQL Actually defines schema views that awould allow you to query for
> objects, BUT - if you are not for a specific dtabase (or set thereof) I
> think not all databases support the schema views yet.
>
> Regards
>
> Thomas Tomiczek
> THONA Consulting Ltd.
> (Microsoft MVP C#/.NET)
>
>
>
> -----Original Message-----
> From: Jeff Block [mailto:[EMAIL PROTECTED]]
> Sent: Mittwoch, 24. April 2002 23:11
> To: [EMAIL PROTECTED]
> Subject: [DOTNET] Checking Existance and Creating SqlServer Objects
>
>
> Is there a way to query for the existance of tables and stored
> procedures from C#? From VB6 land I was using SQLDMO, but can't seem to
> figure it out through interop in C#. I want to be able to create
> tables, but only if they don't exist first, stored procedures I would
> most likely want to just drop and recreate. Any thoughts would be very
> appreciated!
>
> TIA...
>
> Jeff
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET,
> or subscribe to other DevelopMentor lists at http://discuss.develop.com.
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.