都不行啊!代码如下: string mySql2 = "if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[t1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) \r\n drop table [dbo].[t1] \r\n go \r\n create table t1(id int identity(1,1),name varchar(16))";
http://expert.csdn.net/Expert/topic/1855/1855448.xml?temp=2.082461E-02 执行sql script文件. hope it helps
string mySql2 = "if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[t1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) \r\n drop table [dbo].[t1] \r\n go \r\n create table t1(id int identity(1,1),name varchar(16))";
执行sql script文件.
hope it helps