SQLServer 2005 中的类型 与 C# 中的类型 对应 关系
<Language from="SQL" To="C#">
<Type from="bigint" To="long" />
<Type from="binary" To="object" />
<Type from="bit" To="bool" />
<Type from="char" To="string" />
<Type from="datetime" To="DateTime" />
<Type from="decimal" To="decimal" />
<Type from="float" To="double" />
<Type from="image" To="byte[]" />
<Type from="int" To="int" />
<Type from="money" To="decimal" />
<Type from="nchar" To="string" />
<Type from="ntext" To="string" />
<Type from="numeric" To="decimal" />
<Type from="nvarchar" To="string" />
<Type from="real" To="float" />
<Type from="smalldatetime" To="DateTime" />
<Type from="smallint" To="short" />
<Type from="smallmoney" To="decimal" />
<Type from="text" To="string" />
<Type from="timestamp" To="byte[]" />
<Type from="tinyint" To="byte" />
<Type from="uniqueidentifier" To="Guid" />
<Type from="varbinary" To="byte[]" />
<Type from="varchar" To="string" />
<Type from="xml" To="string" />
<Type from="sql_variant" To="object" />
</Language>
<Language from="SQL" To="C# System Types">
<Type from="bigint" To="System.Int64" />
<Type from="binary" To="System.Object" />
<Type from="bit" To="System.Boolean" />
<Type from="char" To="System.String" />
<Type from="datetime" To="System.DateTime" />
<Type from="decimal" To="System.Decimal" />
<Type from="float" To="System.Double" />
相关文档:
当SQLServer的系统日志过大,就会引起SQLServer服务器无法启动等一系列问题。今天我遇到了这个问题,在网上搜索了一下,解决方法是删除就可以了,可是当前的ErrorLog正在被SQL使用无法删除啊,要删除只能停止SQL服务器,难道就没有别得办法了吗?
回答是肯定的:使用以下存储过程: ......
查看是否区分大小写-执行存储过程sys.sp_server_info
exec sys.sp_server_info
查看第18行COLLATION_SEQ-collation属性
charset=cp936 collation=Chinese_PRC_CS_AS
cs为区分大小写,CI为不区分大小写
将区分大小写改为不区分大小写
alter database yourDB COLLATE Chinese_PRC_CI_AS
将不区分大小写改为区分大小写
......
ms sqlserver 2005中的存储过程无法在Management Studio中进行调试,
但可以通过Visual Studio 2005来对之进行调试。(可设置断点,单步调试等)
采用Visual Studio调试存储过程的方法如下:
1.启动Visual Studio(可不创建项目),打开Server Explorer(菜单-view-Server Explorer)
......
1、Datediff:
1.1算出日期差:
1.access: datediff('d',fixdate,getdate())
2.sqlserver: datediff(day,fixdate,getdate())
ACCESS实例: select * from table where data=datediff('d',fixdate,getdate())
sqlserver实例: select * from ......
1
<asp:UpdatePanelID="UpdatePanel1"
UpdateMode="Conditional"
runat="server">
<ContentTemplate>
<asp:Button ID="Button1"
......