sql server ´æ´¢¹ý³ÌÀïµÄlikeº¯Êý¡£
ÒÔstring ÀàÐ͵ÄNameΪÀý
ÔÚSQL Óï¾äÀ string sql="Name like'%" + Name.Text + "%';
ÔÚ´æ´¢¹ý³ÌÀ
if @Name!=''
begin
set @strWhere= +' and Name like '''+'%'+@Name+'%'+''''
end
´æ´¢¹ý³ÌÖеÄÒýºÅÊǵ¥ÒýºÅ.
like '''+'%'Öм䲻ÓÃ+Èϲ»³öÀ´¡£
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
1: /*
2: ͨ¹ýSQL Óï¾ä±¸·ÝÊý¾Ý¿â
3: */
4: BACKUP DATABASE mydb
5: TO DISK ='C:\DBBACK\mydb.BAK'
6: --ÕâÀïÖ¸¶¨ÐèÒª±¸·ÝÊý¾Ý¿âµÄ·¾¶ºÍÎļþÃû,×¢Òâ:·¾¶µÄÎļþ¼ÐÊDZØÐëÒѾ´´½¨µÄ.ÎļþÃû¿ÉÒÔʹÓÃÈÕÆÚÀ´±êʾ
7:
8: /*
9: ͨ¹ýSQLÓï¾ä»¹ÔÊý¾Ý¿â
10: */
11: USE ma ......
µÚÒ»´Î°²×°2005,»¨Á˲»ÉÙ¾«Á¦¡£ËäȻûʲô̫Äѵģ¬µ«ÊDz»ÖªµÀµÄ»°»áºÜ¼¬Êֵġ£Èç¹ûÄãÕýÔÚ°²×°£¬²¢ÇÒ·¢ÏÖÕâƪÎÄÕ£¬ÄÇôÄãºÜ×ßÔË£¬Ä㽫»á˳ÀûµÄ°²×°³É¹¦¡£
°²×°Ä¿Â¼Öаüº¬Sql Server x64 ºÍ x86, x86ÊÇ32λ»úÆ÷µÄ¡£x86ÖÐÓÖÓÐtools ºÍ Servers ¡£µÚÒ»´Î°²×°ÁËServers£¬È» ......
<%
set conn=server.createobject("adodb.connection")
conn.connectionstring="PROVIDER=MSDASQL;DRIVER={SQL Server};SERVER=210.76.209.130;DATABASE=databasename;UID=sa;PWD=password;"
conn.open
%>
ÆäÖÐ 210.76.209.130 ¾ÍÊÇÔ¶³Ì·þÎñÆ÷µÄIP
¶þ¡¢ÎÒÓÃVBдÁ˸ö¹ÜÀíÈí¼þ,²¢²ÉÈ¡PINGÔ¶³Ì·þÎñÆ÷ÓòÃûµÄ ......
´æ´¢½ø³Ì¾ÍÊÇ×÷Ϊ¿ÉÖ´ÐжÔÏó´æ·ÅÔÚÊý¾Ý¿âÖеÄÒ»¸ö»ò¶à¸öSQLÃüÁî¡£
¶¨Òå×ÜÊǺܳéÏó¡£´æ´¢½ø³ÌÆäʵ¾ÍÊÇÄÜÍê³ÉÒ»¶¨²Ù×÷µÄÒ»×éSQLÓï¾ä£¬Ö»²»¹ýÕâ×éÓï¾äÊÇ·ÅÔÚÊý¾Ý¿âÖеÄ(ÕâÀïÎÒÃÇ̸ֻSQL SERVER)¡£Èç¹ûÎÒÃÇͨ¹ý´´½¨´æ´¢½ø³ÌÒÔ¼°ÔÚASPÖе÷Óô洢½ø³Ì£¬¾Í¿ÉÒÔ±ÜÃ⽫SQLÓï¾äͬASP´úÂë»ìÔÓÔÚÒ»Æð¡£ÕâÑù×öµÄºÃ´¦ÖÁÉÙÓÐÈý¸ö£º
µÚÒ»¡ ......