aspµ÷ÓÃsql server´æ´¢¹ý³Ì
ASPµ÷Óô洢¹ý³ÌµÄ·½·¨£º
---- ¡¡¡¡µ÷Óô洢¹ý³ÌµÄ·½·¨ÐèҪʹÓÃADOµÄCommand¶ÔÏó¡£Command¶ÔÏóÊǶÔÒ»¸öÊý¾ÝÔ´ÔËÐÐÌض¨ÃüÁîµÄ¶¨Ò壨ÀýÈ磬һ¸öSQL²éѯ»òÒ»¸öSQL´æ´¢¹ý³Ì£©¡£ÏÂÃæÒÔMS SQL SERVER6.5Ϊºǫ́Êý¾Ý¿â£¬½éÉÜASPµ÷Óô洢¹ý³ÌµÄ·½·¨¡£
---- ¡¡¡¡ÀýÈ磬ÔÚ±íUserÖб£´æÁËÓû§ÃûºÍÃÜÂë¡£ÏÖÔÚ½¨Á¢Ò»¸ö¼ì²éÃÜÂëµÄ´æ´¢¹ý³Ìsp_CheckPassÀ´¼ì²éÓû§ÊÇ·ñÊäÈëÁ˺Ϸ¨µÄÃÜÂë¡£½¨Á¢´æ´¢¹ý³Ì£¬¿ÉÒÔ´ÓMicrosoft SQL Sever³ÌÐò×éÖÐÆô¶¯ISQL/w¡£È»ºó£¬ÔÚ²éѯ´°¿ÚÖÐÊäÈë´æ´¢¹ý³Ì£º
/*´æ´¢¹ý³ÌÀý³Ì*/
CREATE PROCEDURE sp_CheckPass
@CHKName VARCHAR(30),@CHKPass VARCHAR(30),
@ISValid CHAR(8) OUTPUT¡¡¡¡
AS
IF EXISTS(SELECT UserName from Users
WHERE UserName=@CHKName AND UserPwd=@CHKPass)
SELECT @ISVaid="pass"
ELSE
SELECT @ISValid="Invalid"
---- ¡¡¡¡´æ´¢¹ý³Ì½ÓÊÕÁ½¸öÊäÈë²ÎÊý¡£ÊäÈë²ÎÊý@CHKNameÏò´æ´¢¹ý³Ì´«µÝÒ»¸öÓû§Ãû¡£@CHKPassÏò´æ´¢¹ý³Ì´«µÝÒ»¸öÃÜÂë¡£Èç¹ûÓÐÓû§ÓµÓÐÖ¸¶¨µÄÃÜÂ룬Êä³ö²ÎÊý½«·µ»Ø“pass"£¬·ñÔò£¬·µ»Ø“Invalid"¡£
---- ¡¡¡¡ÏÖÔÚÎÒÃÇ¿ÉÒÔÔÚCheckPass.aspÖе÷Óô洢¹ý³Ìsp_CheckPass ÁË¡£
CheckPass.asp
< !--#INCLUDE VIRTUAL="ADOVBS.inc"-- > ’
°üº¬VBSCRIPTµÄ³£Á¿¶¨ÒåÎļþ
< %
Set DataConn=Sever.CreateObject("ADODB.Connection")
'½¨Á¢Á¬½Ó¶ÔÏó
Dataconn.Open"DSN=user;SERVER=APP_SERVER;
UID=sa;PWD=;APP=Microsoft(R) Developer Studio;
WSID=APP_SERVER;Regional=Yes"
Set cmdTemp=Sever.CreateObject("ADODB.Command")
'½¨Á¢ÃüÁî¶ÔÏó
Set cmdTemp.ActiveConnection=DataConn
cmdTemp.CommandType=adC
Ïà¹ØÎĵµ£º
Sql´úÂë
--²ÉÓÃSQLÓï¾äʵÏÖsql2005ºÍExcel Êý¾ÝÖ®¼äµÄÊý¾Ýµ¼Èëµ¼³ö£¬ÔÚÍøÉÏÕÒÀ´Ò»--Ï£¬ÊµÏÖ·½·¨ÊÇÕâÑùµÄ£º
--Excel---->SQL2005 µ¼È룺
select * into useinfo from O ......
1.´ò¿ªSQL server enterprise mananger “ÆóÒµ¹ÜÀíÆ÷”
ÔÚÄãÒªµ¼³öµÄSQLÊý¾Ý¿âÉÏÊó±êÓÒ¼ü²Ëµ¥£ºËùÓÐÈÎÎñ-¡·µ¼³öÊý¾Ý
2.»Ø³öÏÖÒ»¸öµ¼³öÏòµ¼´°¿Ú¡£
Ñ¡Ôñ±»µ¼³öµÄÊý¾ÝÔ´£¬ÎªÄã¸Õ²ÅËùÑ¡ÔñµÄÊý¾Ý¿â£¬Èç¹û·¢ÏÖ²»¶ÔÓ¦×ÔÐÐÐ޸ġ£
3.½øÈëµ¼³öµ½Ä¿±êÊý¾ÝÔ´µÄÑ¡Ôñ£¬ÕâÀïÎÒÃÇҪת³ÉACCESSµÄÊý¾Ý¿â¡£×¢ÒâÑ¡ÔñÊý¾ÝÔ´ÀàÐÍÎ ......
import java.sql.*;
/*
* JAVAÁ¬½ÓACCESS£¬SQL Server,MySQL,OracleÊý¾Ý¿â
*
* */
public class JDBC {
public static void main(String[] args)throws Exception {
Connection conn=null;
//====Á¬½ÓACCESSÊý¾Ý¿â ......
Ô´´ÓÚ2008Äê04ÔÂ02ÈÕ£¬2009Äê10ÔÂ18ÈÕǨÒÆÖÁ´Ë¡£
ÔÚÊý¾Ý²Ö¿âµÄ»ù±¾±¨±íÖÆ×÷¹ý³ÌÖУ¬Í¨³£»áʹÓÃ
SQL
×÷ΪÊý¾ÝÔ´£¬¿ÉÊÇÆÕͨµÄ
SQL
ʵ
ÔÚ²»Êʺϴ¦ÀíһЩ½ÏΪ¸´ÔÓµÄÂß¼Åжϣ»Ò»°ã¶øÑÔ£¬´ý²éѯµÄÊý¾ÝÀàÐÍÖ÷Òª°üÀ¨ÈÕÆÚÐÍ¡¢Êý×ÖÐÍ¡¢×Ö·û´®ÕâÈýÀàÊý¾ÝÀàÐÍ£»ÔÚ±¨±í²éѯ½çÃæÇ°¶Î£¬Êµ¼ÊÉÏ»á¶Ô²éѯµÄ
Êý¾Ý×÷һЩȱʡ´¦Àí£¬À ......