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

sql×¢Èë

Ê×ÏÈÎÒÏëлл԰×ÓµÄÅóÓÑÃÇ£¬ÊÇÄãÃÇÌáÐÑÎÒдÄÚÈÝÓдíÎ󣬼ǵÃÔø¾­µç×ÓÉÌÎñÖ®Êý¾Ý´æ´¢Á÷³Ì£¨Î壩ÀïÃæ˵µ½“Ñ¡´æ´¢¹ý³Ì+´«µÝ²ÎÊýÓÃSqlParameterÊÇÒòΪ£¬³ý·ÇÊÇADO.NETÓЩ¶´£¬ÄÇô¾Í¾ø¶Ô²»»á·¢ÉúSQL×¢È딡£Keep Walking´ó¸çÒ²ÔÚ¹ØÓÚ·ÀÖ¹sql×¢ÈëµÄ¼¸ÖÖÊֶΣ¨¶þ£©ÖоٳöÀ´Ò»¸öÀý×Ó˵Ã÷ÎÒ˵µÄÉϾ仰ÊÇ´íÎóµÄ¡£ËµÊµ»°µ±Ê±ÎÒ»¹ÊǶÔSQL×¢Èë²»ÊǺÜÁ˽⣬ҲûÓÐÓöµ½¹ýSQL×¢È룬Ҳ²»ÊǺܹØÐÄËü¡£µ«ÊÇÎÒÏ밲ȫµÄÎÊÌâÎÒÃÇÒ»¶¨Òª·Ç³£×¢Ò⣬ÓÚÊÇÕâЩʱºò»¨ÁËһЩʱ¼äÀ´Ñ§Ï°ÁËSQL×¢Èë¡£
ʲôÊÇSQL×¢Èë
¡¡¡¡¿ÉÄÜ´ó¼Ò»¹²»ÊǶÔSQL×¢ÈëÕâ¸ö¸ÅÄî²»ÊǺÜÇå³þ£¬¼òµ¥µØ˵,SQL×¢Èë¾ÍÊǹ¥»÷Õßͨ¹ýÕý³£µÄWEBÒ³Ãæ,°Ñ×Ô¼ºSQL´úÂë´«Èëµ½Ó¦ÓóÌÐòÖÐ,´Ó¶øͨ¹ýÖ´ÐзdzÌÐòÔ±Ô¤ÆÚµÄSQL´úÂë,´ïµ½ÇÔÈ¡Êý¾Ý»òÆÆ»µµÄÄ¿µÄ¡£
¡¡¡¡µ±Ó¦ÓóÌÐòʹÓÃÊäÈëÄÚÈÝÀ´¹¹Ô춯̬SQLÓï¾äÒÔ·ÃÎÊÊý¾Ý¿âʱ£¬»á·¢ÉúSQL×¢Èë¹¥»÷¡£Èç¹û´úÂëʹÓô洢¹ý³Ì£¬¶øÕâЩ´æ´¢¹ý³Ì×÷Ϊ°üº¬Î´É¸Ñ¡µÄÓû§ÊäÈëµÄ×Ö·û´®À´´«µÝ£¬Ò²»á·¢ÉúSQL×¢Èë¡£SQL×¢Èë¿ÉÄܵ¼Ö¹¥»÷ÕßʹÓÃÓ¦ÓóÌÐòµÇ½ÔÚÊý¾Ý¿âÖÐÖ´ÐÐÃüÁî¡£Èç¹ûÓ¦ÓóÌÐòʹÓÃÌØȨ¹ý¸ßµÄÕÊ»§Á¬½Óµ½Êý¾Ý¿â£¬ÕâÖÖÎÊÌâ»á±äµÃºÜÑÏÖØ¡£ÔÚijЩ±íµ¥ÖУ¬Óû§ÊäÈëµÄÄÚÈÝÖ±½ÓÓÃÀ´¹¹Ô죨»òÕßÓ°Ï죩¶¯Ì¬SQLÃüÁ»òÕß×÷Ϊ´æ´¢¹ý³ÌµÄÊäÈë²ÎÊý£¬ÕâЩ±íµ¥ÌرðÈÝÒ×Êܵ½SQL×¢ÈëµÄ¹¥»÷¡£¶øÐí¶àÍøÕ¾³ÌÐòÔÚ±àдʱ£¬Ã»ÓжÔÓû§ÊäÈëµÄºÏ·¨ÐÔ½øÐÐÅжϻòÕß³ÌÐòÖб¾ÉíµÄ±äÁ¿´¦Àí²»µ±£¬Ê¹Ó¦ÓóÌÐò´æÔÚ°²È«Òþ»¼¡£ÕâÑù£¬Óû§¾Í¿ÉÒÔÌá½»Ò»¶ÎÊý¾Ý¿â²éѯµÄ´úÂ룬¸ù¾Ý³ÌÐò·µ»ØµÄ½á¹û£¬»ñµÃһЩÃô¸ÐµÄÐÅÏ¢»òÕß¿ØÖÆÕû¸ö·þÎñÆ÷£¬ÓÚÊÇSQL×¢Èë¾Í·¢ÉúÁË¡£
Ò»°ãSQL×¢Èë
¡¡¡¡ÔÚWeb Ó¦ÓóÌÐòµÄµÇ¼ÑéÖ¤³ÌÐòÖÐ,Ò»°ãÓÐÓû§Ãû(username) ºÍÃÜÂë(password) Á½¸ö²ÎÊý,³ÌÐò»áͨ¹ýÓû§ËùÌá½»ÊäÈëµÄÓû§ÃûºÍÃÜÂëÀ´Ö´ÐÐÊÚȨ²Ù×÷¡£ÎÒÃÇÓкܶàÈËϲ»¶½«SQLÓï¾äÆ´½ÓÆðÀ´¡£ÀýÈ磺
¡¡¡¡Select * from users where username =’ txtusername.Text ’ and  password =’ txtpassword.Text ’
¡¡¡¡ÆäÔ­ÀíÊÇͨ¹ý²éÕÒusers ±íÖеÄÓû§Ãû(username) ºÍÃÜÂë(password) µÄ½á¹ûÀ´½øÐÐÊÚȨ·ÃÎÊ, ÔÚtxtusername.TextΪmysql£¬txtpassword.TextΪmary£¬ÄÇôSQL²éѯÓï¾ä¾ÍΪ£º
¡¡¡¡Select * from users where username =’ mysql ’ and  password  =’ mary ’
¡¡¡¡Èç¹û·Ö±ð¸øtxtusername.Text ºÍtxtpassword.Text¸³Öµ’ or ‘1’ = ‘1’ --ºÍab


Ïà¹ØÎĵµ£º

¶ÁÈ¡SQL±íÉú³ÉTREEVIEW

Public Function GetDataTable()
Dim myComm As New SqlClient.SqlCommand("SELECT cauth_id,cauth_name,igrade,csupauth_id,csupauth_name from MAIN_TREE01 ", sqlconnection1)
Dim sdapt As New SqlClient.SqlDataAdapter(myComm)
Dim ds As New DataSet
sdapt.Fill(ds)
R ......

ÓÃC++·ÃÎÊSQL Server 2000µÄʵÀý

Ò»¡¢ADO¼ò½é
¡¡¡¡ADO(ActiveX Data Object)ÊÇMicrosoftÊý¾Ý¿âÓ¦ÓóÌÐò¿ª·¢µÄнӿڣ¬Êǽ¨Á¢ÔÚOLE DBÖ®Éϵĸ߲ãÊý¾Ý¿â·ÃÎʼ¼Êõ,²»½ö¼òµ¥Ò×Ó㬲¢ÇÒ²»Ê§Áé»îÐÔ.²»Ê§ÎªC++ÀûÓÃÊý¾Ý¿â¿ìËÙ¿ª·¢µÄ²»´íÑ¡Ôñ¡£
¡¡¡¡ÀíÂ۾Ͳ»ÓÃÎÒÔÚÕâ¶ù·Ñ»°ÁË,ÍøÉÏÓкܶà,µ«¹âÊÇÀíÂÛ,Ò²²»ÊDz»¹»µÄ,ADO·ÃÎÊÊý¾ÝµÄ·½·¨ºÜÁé»î,ÈÝÒ×ÈÃÈË»ìÏý.ÍøÉÏ´ó²¿·Ö ......

SQL ¸ßЧͨÓ÷ÖÒ³´æ´¢¹ý³Ì(Ë«Ïò¼ìË÷)

create PROC [dbo].[P_viewPage_A]
/*
¸ßЧͨÓ÷ÖÒ³´æ´¢¹ý³Ì(Ë«Ïò¼ìË÷)
¾´¸æ£ºÊÊÓÃÓÚµ¥Ò»Ö÷¼ü»ò´æÔÚΨһֵÁеıí»òÊÓͼ
ps:SqlÓï¾äΪ8000×Ö½Ú,µ÷ÓÃʱÇë×¢Òâ´«Èë²ÎÊý¼°sql×ܳ¤¶È²»Òª³¬¹ýÖ¸¶¨·¶Î§
*/
@TableName VARCHAR(200),     --±íÃû
@FieldList VARCHAR(2000),    --ÏÔʾÁÐà ......

aspÔ¶³Ì·ÃÎÊsql serverÊý¾Ý¿â


<%
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Ô¶³Ì·þÎñÆ÷ÓòÃûµÄ ......

U9 SQLÓû§×Ô¶¨Ò庯Êý

ÔÚ×ö±¨±íʱoqlÓï¾äÖÐÓÐʱÐèÒªÓõ½Óû§×Ô¶¨Ò庯Êý£¬µ÷ÓÃÖ®ºó±¨±í±¨´í£º¡° ¶ÔÊý¾Ý¼¯¡°DataQuery¡±Ö´Ðвéѯʧ°Ü¡£ 'fn_GetLevelItemCatName' ²»ÊÇ¿ÉÒÔʶ±ðµÄ º¯ÊýÃû³Æ¡£ ')' ¸½½üÓÐÓï·¨´íÎó¡£ ¡° £¬ÓÚÊÇÎÒ½«oqlÓï¾ä½âÎöºóÄÃsqlÓï¾äµ½sql server 2008ÖÐÈ¥Ö´Ðб¨´í£º 'fn_GetLevelItemCatName' ²»ÊÇ¿ÉÒÔʶ±ðµÄº¯ÊýÃû³Æ¡£ ÕâÖÖÎÊÌ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ