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" />
相关文档:
//总记录数
function sumRecord()
{
var conn= Server.CreateObject("ADODB.connection");
var rs= Server.CreateObject("adodb.recordset");
conn.open("PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=123456;DATABASE=test");
var sql = "select count(*) as RecordCount from baoming";
rs.open(sql, ......
在asp.net开发中,经常会用到后台和前台的交互,就此总结了一点c#和javascript相互操作的方法
1.在后台c#代码中调用jacascript的方法
javascript代码:
<script type="text/javascript" language="javascript">
function test()
{
alert("oec2003");
return false;
}
</s ......
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 ......
连接Access
首先看一个例子代码片断:
程序代码:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwind.mdb" ......
1
<asp:UpdatePanelID="UpdatePanel1"
UpdateMode="Conditional"
runat="server">
<ContentTemplate>
<asp:Button ID="Button1"
......