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

sql server 2005 imageÊý¾ÝÀàÐ͵ÄʹÓÃ

       ×î½ü×öÒ»¸öÏîÄ¿µÄʱºòÐèÒªÍùÊý¾Ý¿âÄÚ²åÈëͼƬ£¬ÉÏÍø²éÁËһϣ¬Ö÷ÒªÓÐÁ½ÖÖ·½·¨£¬µÚÒ»¾ÍÊÇÔÚÊý¾Ý¿âÖд洢ͼƬµÄ·¾¶£¬È»ºóÔÚ³ÌÐòÖиù¾Ý¶ÁÈ¡µÄ·¾¶¶ÁȡͼƬ£»ÕâÖÖ·½·¨¼òµ¥¡¢ÈÝÒ×ʹÓ㬵«ÊÇÔÚͼƬ¹ý¶àʱ²»ºÃ¹ÜÀí¡£
      µÚ¶þÖÖ¾ÍÊǽ«Í¼Æ¬×ª»»³É¶þ½øÖÆ´æ´¢ÓÚÊý¾Ý¿âÖУ¬sql server 2005ÓиöimageÊý¾ÝÀàÐÍ,רÃÅÓÃÓڴ洢ͼƬ£¬ImageÊý¾ÝÀàÐÍ´æ´¢µÄÊdz¤¶È²»È·¶¨µÄ¶þ½øÖÆÊý¾Ý£¬×î´ó³¤¶ÈÊÇ2GB¡£
      µÚÒ»ÖÖ·½·¨ºÜ¼òµ¥£¬Ö÷ÒªÏëͨ¹ýÒ»¸öÀý×Ó˵һϵڶþÖÖ·½·¨¡£²½ÖèÈçÏÂ:
1.¿ª·¢»·¾³£ºvisual studio 2008 + sql server 2005 ÓïÑÔ£ºC#
2.ÔÚsql server 2005ÖÐн¨Ò»¸öÊý¾Ý¿â±í£¬ÎÒÕâÀïÓõÄÊÇÎÒ×Ô¼ºÏîÄ¿µÄ±í£¬Óï·¨ÈçÏ¡£
CREATE TABLE [dbo].[AdminInfo](
 [AdminId] [nvarchar](15) NOT NULL,
 [AdminName] [nchar](10) NOT NULL,
 [Pas] [nvarchar](25) NOT NULL,
 [Rights] [int] NOT NULL,
 [Photo] [image] NULL)
×¢Òâphoto×Ö¶ÎÊÇimageÀàÐÍ¡£
3.ÕâÀïÖ÷Ҫͨ¹ýÒ»¸ö¼òµ¥¿ØÖÆ̨ӦÓóÌÐòÑÝʾ²åÈëºÍ¶ÁȡͼƬµÄ¹ý³Ì¡£ÍêÕû´úÂëÈçÏÂ:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data.SqlClient;
using System.Data;
namespace CSharp
{
    class insertImage
    {
        public string sqlconnstr = "Data Source=XIANGZI-PC\\SQLEXPRESS;Initial Catalog=Library;Persist Security Info=True;User ID=xz;Password=comeon";//Êý¾Ý¿âÁ¬½Ó×Ö·û´®;
      
        public void InsertIMG()//²åÈëͼƬ
        {
            FileStream fs = new FileStream(@"D:\c.jpg", FileMode.Open, FileAccess.Read);//¶ÁÈ¡DÅÌc.jpgת»»ÎªÊý¾ÝÁ÷
            Byte[] btye2 = new byte[fs.Length];
            fs.Read(btye2, 0, Convert.ToInt32(fs.Length));
    &nb


Ïà¹ØÎĵµ£º

±ÊÊÔSQLÓï¾ä——ѧϰ±Ê¼Ç

¶¨Ò壺
create table ±íÃû£¨ÁÐÃû1 ÀàÐÍ [not null] [,ÁÐÃû2 ÀàÐÍ] [not null]£¬···£© [ÆäËû²ÎÊý]
Ð޸ģº
alter table ±íÃû add ÁÐÃû ÀàÐÍ
alter table ±íÃû rename column Ô­ÁÐÃû to ÐÂÁÐÃû
alter table ±íÃû alter column ÁÐÃû ÀàÐÍ [£¨¿í¶È£© [£¬Ð¡Êýλ]]
alter table ±íÃû drop column ÁÐÃû ......

SQL SERVERµÇ¼Óû§ÔÚ·þÎñÆ÷ÉϵÄȨÏÞ

SQL SERVERµÇ¼Óû§ÔÚ·þÎñÆ÷ÉϵÄȨÏÞ
Ò»¸öµÇ¼Óû§µ½µ×ÔÚSQL SERVERʵÀýÉÏÓÐʲôÑùµÄȨÏÞ£¬ÏÂÃæÒÔSQL SERVER2005ΪÀýÀ´Ï¸Êýһϡ£
Ò»£®
Ê×ÏȲ鿴¸ÃµÇ¼Óû§ÊôÓÚÄĸö¹Ì¶¨·þÎñÆ÷½ÇÉ«¡£ËùÓÐSQL SERVERµÄµÇ¼Óû§ºÍ½ÇÉ«¶¼»áÔÚmaster.sys.server_principalÊÓͼÉÏÓÐÒ»Ìõ¼Ç¼¡£¶ø¼Ç¼µÇ¼Óû§ÊôÓÚʲô·þÎñÆ÷½ÇÉ«µÄÊÓͼÊÇmaster. ......

ʹÓÃc#´´½¨sql serverµÄ´æ´¢¹ý³Ì_c#Ó¦ÓÃ1

½éÉÜ
ͨ³££¬Ñз¢ÈËԱʹÓõÄÊÇT-SQLÀ´´´½¨SQL ServerµÄ´æ´¢¹ý³Ì¡¢º¯ÊýºÍ´¥·¢Æ÷¡£ ¶øÏÖÔÚµÄSQL Server 2005ÒÑÍêÈ«Ö§³Ö.NETͨÓÃÓïÑÔÔËÐÐʱ£¨CLR£©ÁË¡£ Õâ¾ÍÒâζ×Å£¬ÄúÄܹ»Ê¹ÓÃ.NETµÄÓïÑÔ£¬ÈçC#¡¢VB.NETÖ®ÀàµÄÀ´Ñз¢SQL ServerµÄ´æ´¢¹ý³Ì¡¢º¯ÊýºÍ´¥·¢Æ÷¡£ SQL Server ºÍ CLR µÄ¼¯³É¸øÎÒÃÇ´øÀ´ÁËn¶àºÃ´¦£¬Èçʵʱ±àÒë¡¢ÀàÐÍ°²È«¡ ......

WindowsÏÂÆô¶¯Í£Ö¹SQL Server 2005·þÎñ

ºÜ¶à¼¼Êõ°®ºÃÕߵĵçÄÔÉÏ×ÜÊÇ°²×°Á˺ܶàÈí¼þ£¬°üÀ¨Ó¦ÓÃÈí¼þ¡¢¿ª·¢¹¤¾ßÈí¼þ¼°Êý¾Ý¿âÈí¼þ£¬µ«ÊÇËæ×Åʱ¼äµÄÁ÷ÊÅ£¬ÂýÂýµØµçÄÔÉÏ×°µÄÈí¼þÒѾ­³¬³öÁ˵çÄÔ±¾ÉíËùÄÜ
³ÐÔصÄÁ¿ÁË£¬Òò¶ø³öÏÖÁ˵çÄÔÔËÐÐËÙ¶ÈÂýµÈÎÊÌ⡣ͬʱ£¬Ò²ÓÐһЩµ¥Î»»ò¸öÈ˵ĵçÄÔÓÉÓÚ³ö³§Äê´úÓÐЩ¾ÃÔ¶£¬¼´Ê¹Ö»°²×°Ò»ÖÖ»ò¼«ÉÙÊýÈí¼þʱҲ»áÏÔʾ³öÔËÐÐËÙ¶ÈÂý
µÄÏÖÏó¡£ ......

µ÷ÓÃSQLº¯ÊýÀ´ÊµÏÖºº×ÖÄ£ºý²éѯ

ÔÚsqlÖд´½¨Óû§×Ô¶¨ÒåÆ´Òôº¯Êý£º
create function f_GetPy(@Str nvarchar(400))
returns nvarchar(4000)
as
begin
declare @strlen int,@re nvarchar(4000)
declare @t table(chr nchar(1) collate Chinese_PRC_CI_AS,letter nchar(1))
insert @t select 'ß¹','A' union all select '°Ë','B'
union all select 'àê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ