Thanks Bryan, the SELECT was the key, I was doing a RETURN! Sleep
deprivation at its finest...
Jeff Block
-Original Message-
From: alpine [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 5:50 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Checking Existance and Creating
ema 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
Have you considered just using DDL statements directly? You should be
able to execute those directly from C# via the System.Data.SqlClient
objects. It's really no different than executing INSERT/UPDATE/DELETE
statements.
For example:
if exists (select * from dbo.sysobjects where id =
object_id(N
phen Crabb
-Original Message-
From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of
Thomas Tomiczek
Sent: 25 April 2002 06:57
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Checking Existance and Creating SqlServer Objects
Yes, there is - you can even do it in the create SQL Statement
ge-
From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of
Thomas Tomiczek
Sent: 25 April 2002 06:57
To: [EMAIL PROTECTED]
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
t discussion [mailto:[EMAIL PROTECTED]]On Behalf Of
Thomas Tomiczek
Sent: 25 April 2002 06:57
To: [EMAIL PROTECTED]
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 rea
Check out GetOleDbSchemaTable. That should give you the data you need.
Regards,
Steven Fraser
-Original Message-
From: Jeff Block [mailto:[EMAIL PROTECTED]]
Sent: 24 April 2002 22:11
To: [EMAIL PROTECTED]
Subject: [DOTNET] Checking Existance and Creating SqlServer Objects
M
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
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,
>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
>j
10 matches
Mail list logo