sql server create table script samples

****BEGIN SQL QUERY***
if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_Actions’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)
drop table dbo.tbl_Actions
GO
if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_Authentications’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)
drop table dbo.tbl_Authentications
GO
****BEGIN SQL QUERY***
if exists (select * from dbo.sysobjects where id = object_id(N’dbo.tbl_Actions’) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)
drop table dbo.tbl_Actions
GO
if exists (select [...]

Read More » »

How to SORT a System.Collections.Generic.List

I have to Sort a List of Class
I have 3 Properties in my Class (EX ID,Name,Age)
In my List i have 10 objects of <Class> added
I need to sort By Id or By Name or by Age like DataView Sort.is it possible ?
Please enligten me
Thanx,
How to SORT a System.Collections.Generic.List
I have to Sort a List of Class
I [...]

Read More » »

sql server 插入汉字问题

SQL SERVER 2005 比SQL SERVER 2000增加了很多新特性,我没仔细研究就开始使用SQL SERVER 2005了。遇到的问题还真不少。
SQL SERVER2005中发现不能用vachar()存汉字了(SQL SERVER 2000创建的数据库导入SQL SERVER 2005除外),改用ncachar()了,但写起程序的时候,发现插入的汉字都变成了??,直接用T-SQL语句执行插入,也是一样,在管理器中直接插 入却可以显示汉字。
解决:T-SQL语句中在要要存储的字符前加上N。
如:insert into 表名 (字段名) values(N”內容”);

Read More » »

How to Setup VS Studio 2005 for Import and Export to SQL Server 2005 Express as performed in SQL Server

I have just been getting used to the new VS.NET 2005 IDE environment, IT ROCKS!.  And this integrated help is pretty useful when we can all collaborate on the many technical topics we all share.
After reading many post blasting Microsoft for NOT including the DTS Import/Export functionality to SQL Server 2005 Express, and many people [...]

Read More » »