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

ÔÚSql Server Öе÷ÓÃJmail×é¼þ·¢ËÍÓʼþ


 ÔÚSql Server Öе÷ÓÃJmail×é¼þ·¢ËÍÓʼþ
Ô¤±¸ÖªÊ¶
    1£®OLE×Ô¶¯»¯º¯Êý
    OLE×Ô¶¯»¯Ê¹Ó¦ÓóÌÐòÄܹ»¶ÔÁíÒ»¸öÓ¦ÓóÌÐòÖÐʵÏֵĶÔÏó½øÐвÙ×÷£¬»òÕß½«¶ÔÏ󹫿ªÒÔ±ã¿ÉÒÔ¶ÔÆä½øÐвÙ×÷¡£×Ô¶¯»¯¿Í»§¶ËÊǿɶÔÊôÓÚÁíÒ»¸öÓ¦ÓóÌÐòµÄ¹«¿ª¶ÔÏó½øÐвÙ×÷µÄÓ¦ÓóÌÐò£¬±¾ÎÄÖµµÃÊÇSql Server¡£¹«¿ª¶ÔÏóµÄÓ¦ÓóÌÐò³ÆΪ×Ô¶¯»¯·þÎñÆ÷£¬ÓÖ³ÉΪ×Ô¶¯»¯×é¼þ£¬±¾ÎÄÖм´Jmail×é¼þ¿©¡£¿Í»§¶Ëͨ¹ý·ÃÎÊÓ¦ÓóÌÐò¶ÔÏóµÄÊôÐԺͺ¯Êý¶ÔÕâЩ¶ÔÏó½øÐвÙ×÷¡£
ÔÚSql ServerʹÓÃOle×é¼þµÄ;¾¶ÊǼ¸¸öϵͳÀ©Õ¹´æ´¢¹ý³Ìsp_OACreate¡¢sp_OADestroy¡¢sp_OAGetErrorInfo¡¢sp_OAMethod¡¢sp_OASetPropertyºÍsp_OAGetProperty£¬Ôٴμòµ¥µØ½éÉÜÒ»ÏÂʹÓ÷½·¨£¬Ïêϸ×ÊÁϲο¼Sql ServerÁª»ú´ÔÊé¡£
 
    OLE×Ô¶¯»¯¶ÔÏóµÄʹÓ÷½·¨£º
    £¨1£©µ÷ÓÃsp_OACreate ´´½¨¶ÔÏó¡£
    ¸ñʽ£ºsp_OACreate clsid,objecttoken OUTPUT [ , context ]
    ²ÎÊý£ºclsid——ÊÇÒª´´½¨µÄOLE ¶ÔÏóµÄ³ÌÐò±êʶ·û(ProgID)¡£´Ë×Ö·û´®ÃèÊö¸ÃOLE ¶ÔÏóµÄÀ࣬ÆäÐÎʽ£¬Èç'OLEComponent.Object'£¬OLEComponent ÊÇOLE ×Ô¶¯»¯·þÎñÆ÷µÄ×é¼þÃû³Æ£¬Object ÊÇOLE ¶ÔÏóÃû£¬±¾ÎÄÖÐʹÓõēJMail.Message”;
Objecttoken——ÊÇ·µ»ØµÄ¶ÔÏó±êÖ¾£¬²¢ÇÒ±ØÐëÊÇÊý¾ÝÀàÐÍΪint µÄ¾Ö²¿±äÁ¿¡£ÓÃÓÚ±êʶËù´´½¨µÄOLE ¶ÔÏ󣬲¢½«ÔÚµ÷ÓÃÆäËüOLE ×Ô¶¯»¯´æ´¢¹ý³ÌʱʹÓᣱ¾ÎÄÖоÍÊÇͨ¹ýËüÀ´µ÷ÓÃJMail.Message×é¼þµÄÊôÐԺͷ½·¨µÄ¡£
 
Context——Ö¸¶¨Ð´´½¨µÄOLE ¶ÔÏóÒªÔÚÆäÖÐÔËÐеÄÖ´ÐÐÉÏÏÂÎÄ¡£±¾ÎIJ»Ê¹ÓøòÎÊý£¬¹Ê²»×¸Êö¡£ÒÔÏÂÓë´ËÒ»Ö£¬ËùÓз½·¨ÊôÐÔµÄÆäËûÓ÷¨Çë²ÎÔÄSql ServerÁª»úÎĵµ¡£
 
    £¨2£©Ê¹ÓøöÔÏó¡£
    £¨a£©µ÷ÓÃsp_OAGetProperty »ñÈ¡ÊôÐÔÖµ¡£
    ¸ñʽ£º_OAGetProperty objecttoken,propertyname [, propertyvalue OUTPUT]
    ²ÎÊý£º£¨Ç°Ãæ³öÏÖ¹ýµÄ²ÎÊý£¬ÒÔϾùÊ¡ÂÔ¡££©
    Propertyname——¶ÔÏóµÄÊôÐÔÃû³Æ£»
Propertyvalue——·µ»ØµÄ¶ÔÏóµÄÊôÐÔÖµ£¬¸Ã²ÎÊý´øOUTPUTÊôÐÔ£¬Ö´ÐиòÙ×÷ºó£¬Äã¾Í¿ÉÒÔ´ÓpropertyvalueÖеõ½ÊôÐÔµÄÖµÁË¡£
 
    £¨b£©µ÷ÓÃsp_OASetProperty ½«ÊôÐÔÉèΪÐÂÖµ¡£
    ¸ñʽ£ºsp_OASetProperty


Ïà¹ØÎĵµ£º

Sql Server ÖÐÒ»¸ö·Ç³£Ç¿´óµÄÈÕÆÚ¸ñʽ»¯º¯Êý

Sql Server ÖÐÒ»¸ö·Ç³£Ç¿´óµÄÈÕÆÚ¸ñʽ»¯º¯Êý
Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
Select CONVERT(varchar(100), GETDATE(), 1): 05/16/06
Select CONVERT(varchar(100), GETDATE(), 2): 06.05.16
Select CONVERT(varchar(100), GETDATE(), 3): 16/05/06
Select CONVERT(varchar(100), GE ......

SQL ServerË÷Òý¹ÜÀíÖ®Áù´óÌúÂÉ


Ô­ÎÄת×Ô:http://tech.it168.com/a2009/0218/265/000000265868.shtml
Ë÷ÒýÊÇÒÔ±íÁÐΪ»ù´¡µÄÊý¾Ý¿â¶ÔÏó¡£Ë÷ÒýÖб£´æ×űíÖÐÅÅÐòµÄË÷ÒýÁУ¬²¢ÇҼͼÁËË÷ÒýÁÐÔÚÊý¾Ý¿â±íÖеÄÎïÀí´æ´¢Î»Öã¬ÊµÏÖÁ˱íÖÐÊý¾ÝµÄÂß¼­ÅÅÐò¡£Í¨¹ýË÷Òý£¬¿ÉÒÔ¼Ó¿ìÊý¾ÝµÄ²éѯËٶȺͼõÉÙϵͳµÄÏìӦʱ¼ä;¿ÉÒÔʹ±íºÍ±íÖ®¼äµÄÁ¬½ÓËٶȼӿ졣
  µ«ÊÇ£¬ ......

ʹÓà TRY/CATCH Óï¾ä½â¾ö SQL Server 2005 ËÀËø

¶ÔÓÚ½ñÌìµÄ RDBMS Ìåϵ½á¹¹¶øÑÔ£¬ËÀËøÄÑÒÔ±ÜÃâ — ÔÚ¸ßÈÝÁ¿µÄ OLTP »·¾³ÖиüÊǼ«ÎªÆձ顣ÕýÊÇÓÉÓÚ .NET µÄ¹«¹²ÓïÑÔÔËÐпâ (CLR) µÄ³öÏÖ£¬ SQL Server 2005 ²ÅµÃÒÔΪ¿ª·¢ÈËÔ±ÌṩһÖÖеĴíÎó´¦Àí·½·¨¡£ÔÚ±¾ÔÂרÀ¸ÖУ¬ Ron Talmage ΪÄú½éÉÜÈçºÎʹÓà TRY/CATCH Óï¾äÀ´½â¾öÒ»¸öËÀËøÎÊÌâ¡£
Ò»¸öʾÀýËÀËø
ÈÃÎÒÃÇ´ÓÕâÑùÒ ......

oracle sql±ÊÊÔÌâ

Ò»¡¢ Êý¾Ý¿â ORACLE
ËäÈ»ÕâЩÌâÄ¿¶¼¿ÉÒÔGµ½£¬µ«»¹ÊÇÒª¿¼²ìÒ»ÏÂÄúÏÖÔڵij£Ì¬Ë®Æ½£¬£º£©
T±í£º£¨×ֶΣºID£¬NAME£¬ADDRESS£¬PHONE£¬LOGDATE£©
E±í£º£¨×ֶΣºNAME£¬ADDRESS£¬PHONE£©
1£® ½«±íTÖеÄ×Ö¶ÎLOGDATEÖÐΪ2001-02-11µÄÊý¾Ý¸üÐÂΪ2003-01-01£¬Çëд³öÏàÓ¦µÄSQLÓï¾ä¡££¨¸Ã×Ö¶ÎÀàÐÍΪÈÕÆÚÀàÐÍ£©
2£® Çëд³ö½«±íTÖÐNAME ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ