Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

.NetÔÚSqlServerÖеÄͼƬ´æÈ¡¼¼Êõ

±¾ÎÄ×ܽáÈçºÎÔÚ.Net WinformºÍ.Net webform(asp.net)Öн«Í¼Æ¬´æÈësqlserverÖв¢¶ÁÈ¡ÏÔʾµÄ·½·¨
1£¬Ê¹ÓÃasp.net½«Í¼Æ¬ÉÏ´«²¢´æÈëSqlServerÖУ¬È»ºó´ÓSqlServerÖжÁÈ¡²¢ÏÔʾ³öÀ´
Ò»£¬ÉÏ´«²¢´æÈëSqlServer
Êý¾Ý¿â½á¹¹
create table test
{
id identity(1,1),
FImage image
}
Ïà¹ØµÄ´æ´¢¹ý³Ì
Create proc UpdateImage
(
@UpdateImage Image
)
As
Insert Into test(FImage) values(@UpdateImage)
GO
ÔÚUpPhoto.aspxÎļþÖÐÌí¼ÓÈçÏÂ:
<input id="UpPhoto" name="UpPhoto" runat="server" type="file">
<asp:Button id="btnAdd" name="btnAdd" runat="server" Text="ÉÏ´«"></asp:Button>
È»ºóÔÚºóÖôúÂëÎļþUpPhoto.aspx.csÌí¼ÓbtnAdd°´Å¥µÄµ¥»÷ʼþ´¦Àí´úÂë:
private void btnAdd_Click(object sender, System.EventArgs e)
{
//»ñµÃͼÏó²¢°ÑͼÏóת»»Îªbyte[]
HttpPostedFile upPhoto=UpPhoto.PostedFile;
int upPhotoLength=upPhoto.ContentLength;
byte[] PhotoArray=new Byte[upPhotoLength];
Stream PhotoStream=upPhoto.InputStream;
PhotoStream.Read(PhotoArray,0,upPhotoLength);
//Á¬½ÓÊý¾Ý¿â
SqlConnection conn=new SqlConnection();
conn.ConnectionString="Data Source=localhost;Database=test;User Id=sa;Pwd=sa";
SqlCommand cmd=new SqlCommand("UpdateImage",conn);
cmd.CommandType=CommandType.StoredProcedure;
cmd.Parameters.Add("@UpdateImage",SqlDbType.Image);
cmd.Parameters["@UpdateImage"].Value=PhotoArray;
//Èç¹ûÄãÏ£Íû²»Ê¹Óô洢¹ý³ÌÀ´Ìí¼ÓͼƬ°ÑÉÏÃæËľä´úÂë¸ÄΪ£º
//string strSql="Insert into test(FImage) values(@FImage)";
//SqlCommand cmd=new SqlCommand(strSql,conn);
//cmd.Parameters.Add("@FImage",SqlDbType.Image);
//cmd.Parameters["@FImage"].Value=PhotoArray;
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
}
¶þ£¬´ÓSqlServerÖжÁÈ¡²¢ÏÔʾ³öÀ´
ÔÚÐèÒªÏÔʾͼƬµÄµØ·½Ìí¼ÓÈçÏ´úÂë:
<asp:image id="imgPhoto" runat="server" ImageUrl="ShowPhoto.aspx"></asp:image>
ShowPhoto.aspxÖ÷Ìå´úÂ룺
private void Page_Load(object sender, System.EventArgs e)
{
if(!Page.IsPostBack)
{
SqlConnection conn=new SqlConnection()
conn.ConnectionString="Data Source=localhost;Database=test;User Id=sa;Pw


Ïà¹ØÎĵµ£º

¹ØÓÚSQLSERVERÖиüÐÂTextÀàÐÍSQLÓï¾ä½âÎö

 »ù±¾·½·¨:
                   
UPDATETEXT { table_name.dest_column_name dest_text_ptr }//{ Òª¸üеıíÒÔ¼° text¡¢ntext »ò image ÁеÄÃû³Æ,Ö¸ÏòÒª¸üÐ嵀 text¡¢ntext »ò image Êý¾ÝµÄÎı¾Ö¸ÕëµÄÖµ£¨ÓÉ TEXT ......

Flex+JavaÁ¬½ÓSQLServerÊý¾Ý¿â

 Ê×ÏÈ£¬×öÒ»µã˵Ã÷¡£FlexÊDz»ÄÜÖ±½ÓÁ¬½ÓÊý¾Ý¿âµÄ£¬ÕâÒ»µã´ó¼ÒÐèÒªÖªµÀ£¬ËüÖ»Äܼä½ÓµØÁ¬½ÓÊý¾Ý¿â¡£FlexÖÐÌṩÁËÈýÖÖ·½Ê½£ºHttpService£¬WebService ºÍRemoteObject¡£ÆäÖÐHttpService¿ÉÒÔÖ±½Ó»ñÈ¡XMLÖеÄÊý¾Ý£¬»¹¿ÉÒÔͨ¹ýJSP,ASPÒÔ¼°PHP¶ÁÈ¡Êý¾Ý¿âÖеÄÊý¾Ý£¬Õâ¸ö±È½Ï¼òµ¥£¬¶øÇÒÍøÉÏÒ²ÓкܶàÀý×Ó£¬ÎҾͲ»¶à˵ÁË¡£WebServi ......

SQLServerËø»úÖÆÑо¿

 
Ïà¹ØÎÄÕÂ:  
mysqlÊý¾Ý¿âËø
ORACLEÀXÖÖËøÄ£Ê½
ÍÆ¼öȦ×Ó: Pipboy
¸ü¶àÏà¹ØÍÆ¼ö
new Draggable("related_topics");

¶ÔËø»úÖÆµÄÑо¿Òª¾ß±¸Á½¸öÌõ¼þ£º
1£®Êý¾ÝÁ¿´ó
2£®¶à¸öÓû§Í¬Ê±²¢·¢
Èç¹ûȱÉÙÕâÁ½¸öÌõ¼þ£¬Êý¾Ý¿â²»ÈÝÒײúÉúËÀËøÎÊÌâ¡£Ñо¿ÆðÀ´¿ÉÄÜ»áʱ¶¹ ......

´«ÖDz¥¿ÍÎÒµÄSqlServer½Å±¾

 
======================SqlServer´ó²¿·Ö֪ʶ¶¼ÔÚÎÒÕâ½Å±¾Àï===============
Èç¹ûÄãÄܰÑÊý¾Ý½á¹¹»­³öÀ´µÄ»°£¬ÄÇôÄã¾ÍÈëÃÅÁË£¡£¡ºÇºÇ£¡£¡
--²é¿´konwyoumore¿âÊÇ·ñ´æÔÚ
USE master
IF exists(SELECT * from sysdatabases WHERE name='KnowYouMore')
BEGIN
DROP DATABASE knowyoumore;
END
GO
--´´½¨konwyo ......

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.SqlC ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ