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ÀàÐÍÔÚÊý¾Ý¿âÖÐÊÇ¿´²»µ½ÖµµÄ
Æð³õÎÒ»¹ÒÔΪÊý¾ÝûÓвåÈ룬ºóÀ´²ÅÖªµÀntextÀàÐÍÔÚÊý¾Ý¿âÖб¾À´¾Í¿´²»µ½µÄ£¨Êý¾Ý½Ï¶ÌµÄ¿ÉÒÔ¿´µ½£©£»
ÄÇÎÒÒªÏë¿´µ½ntextÊý¾ÝÔõô°ì£¿
ÔÚ²éѯ·ÖÎöÆ÷ÖпÉÒÔ¿´µ½£¨²éѯ·ÖÎöÆ÷ÖÐÒ²Ö»¿´µ½ÁËÇ°¼¸Ê®¸ö×Ö·û£¬¡¡²»ÊÇÈ«²¿µÄ£© ......
1.asp.netºô½Ðjs
Response.Write("<script language=javascript>");
......
ͻ 񻣼
¡¡±¾ÎÄÕë¶ÔÄ¿Ç°C/SģʽϱàдµÄÓ¦ÓóÌÐò¿Éά»¤ÐÔ²îµÄÌص㣬Ìá³öÁËÒ»Ì××Ô¶¯ÔÚÏßÉý¼¶µÄ½â¾ö·½°¸£¬·ÖÎöÁËÔÚÏßÉý¼¶µÄÀ§ÄѼ°ÊµÏÖÔÀí£¬²¢¸ø³öÁËʵÏÖÉý¼¶µÄ²¿·Ö´úÂ룬¾ßÓÐʵ¼Ê²Î¿¼¼ÛÖµºÍÏÖʵÒâÒå¡£±¾ÎijÌÐò´úÂë¾ùÔÚ.Net Framework 1.1 ºÍWindows2000ϲâÊÔͨ¹ý¡£
¡¡¹Ø¼ü´Ê£ºC#£»ÔÚÏßÉý¼¶£»×Ô¶¯Éý¼¶£ ......
SQLiteÊÇÒ»¸ö¾«ÇɵÄÇáÁ¿¼¶Êý¾Ý¿â£¬½ñÌìÖÕÓÚ»ù±¾ÕÆÎÕÁËÈçºÎÓÃC#²Ù×÷SQLiteÊý¾Ý¿â¡£¸ù¾ÝÍøÓÑÃǵľÑ飬ÖÁÉÙÓÐÁ½ÖÖ·½·¨¿ÉÒÔ×öµ½SQLiteµÄµ÷Óã¬Ò»ÖÖÊǵ÷ÓÃsqlite3.dll£¬Ò»ÖÖÊÇÓÃSystem.Data.SQLite£¬¼´sqlite.ADO.NET,ÊÇרΪC sharp·â×°µÄsqliteº¯Êý£¬ºÜÁ÷ÐС£
¼òµ¥Ãè ......
Ò»£ºC# Á¬½ÓSQLÊý¾Ý¿â
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
Server=myServerAddress;Database=myDataBase;User ID=myUse ......