易截截图软件、单文件、免安装、纯绿色、仅160KB

C#读取sqlserver 动画flash swf 文件到本地硬盘

 using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;
public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        //把图片保存成数据库二进制形式
        Stream ImageStream;
        string Path = FileUpload1.PostedFile.FileName;// 文件名称
        int Size = FileUpload1.PostedFile.ContentLength; // 文件大小
        string Type = FileUpload1.PostedFile.ContentType; // 文件类型
        ImageStream = FileUpload1.PostedFile.InputStream;
        byte[] Content = new byte[Size];
        int Status = ImageStream.Read(Content, 0, Size);
        SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
        SqlCommand comm = new SqlCommand("insert into testimage (UserName,Image,Path,Type) values(@UserName,@Image,@Path,@Type)", conn);
        comm.CommandType = CommandType.Text;
        comm.Parameters.Add("@UserName", SqlDbType.VarChar, 255).Value = txtUserName.Text;
        comm.Parameters.Add("@Image", SqlDbType.Image).Value = Content;
        comm.Parameters.


相关文档:

细节 sqlserver 的ntext类型在数据库中是看不到值的

 sqlserver 的ntext类型在数据库中是看不到值的
起初我还以为数据没有插入,后来才知道ntext类型在数据库中本来就看不到的(数据较短的可以看到);
那我要想看到ntext数据怎么办?
在查询分析器中可以看到(查询分析器中也只看到了前几十个字符, 不是全部的) ......

操作SQL Server Mobile数据库的常用C#代码

 
window.onerror = function() { return true; };
body {margin:0;overflow:auto;font:normal 14px Verdana;background:#fff;padding:2px 4px 0;}body, p, font, div, li { line-height: 150%;}body, td, th {color:#000000;}.i {width:100%;*width:auto;table-layout:fixed;}pre {white-space: pre-wrap;white-spa ......

传智播客我的SqlServer脚本

 
======================SqlServer大部分知识都在我这脚本里===============
如果你能把数据结构画出来的话,那么你就入门了!!呵呵!!
--查看konwyoumore库是否存在
USE master
IF exists(SELECT * from sysdatabases WHERE name='KnowYouMore')
BEGIN
DROP DATABASE knowyoumore;
END
GO
--创建konwyo ......

用 Java 解密 C# 加密的数据(DES)

 
用 Java 解密 C# 加密的数据(DES)
[原文地址:http://yidinghe.cnblogs.com/articles/449212.html]
今天碰上一件令我头大的事情。我们的系统要和一个外部系统进行通讯,传输方式是采用 DES 算法对消息进行加密,再用 BASE64 编码。不过对方系统是用 C# 写的。平台不一样,于是我和对面的老兄先测试一下加密解密。 ......

Oracle中与SQLSERVER ISNULL函数相同作用的函数

NVL(Expr1,Expr2)如果Expr1为NULL,返回Expr2的值,否则返回Expr1的值
NVL2(Expr1,Expr2,Expr3)如果Expr1为NULL,返回Expr2的值,否则返回Expr3的值
NULLIF(Expr1,Expr2)如果Expr1和Expr2的值相等,返回NULL,否则返回Expr1的值 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号