ÀûÓÃhibernateµÄQueryÖ±½ÓÖ´ÐÐSQLÓï¾ä
ÀûÓÃhibernateµÄQuery½øÐÐÖ±½ÓÖ´ÐÐSQLÓï¾ä
Ò»¡¢
String sql = "insert into SHOP_MALL_ACCOUNT_MAP_T (MALL_NO,ACCOUNT) values ('"
+ mallNo + "','" + userId + "')";
SQLQuery query = getSession().createSQLQuery(sql);
query.executeUpdate();
¶þ¡¢
String sql = "select to_char(SYN_DATE,'yyyy-MM-dd HH:mm:ss') from SHOP_TRADES_SYN_TIME_T order by SYN_DATE desc";
SQLQuery query = getSession().createSQLQuery(sql);
query.setMaxResults(1);
String resultDate = (String) query.uniqueResult();
Ïà¹ØÎĵµ£º
ÏêϸµØ²½Öè:
1¡¢´ò¿ªMicroSoft Excel 2000
2¡¢Îļþ(F)→н¨(N)→¹¤×÷²¾→
3¡¢ÊäÈëÊý¾Ýºó£¬´æÅÌΪtest.xls£¬
4¡¢Îļþ(F)→Áí´æÎª(A)→
±£´æÀàÐÍΪ£ºÖƱí·û·Ö¸ô£¬ÆðÃûΪtext.txt£¬±£´æµ½C:\ &nb ......
´´½¨Ò»ÕÅ±í£¬Ö±½ÓÔÚ±íÁÐÉϰó¶¨Ä¬ÈÏÖµ
CREATE TABLE hello
(
Id_P int PRIMARY KEY,
Firstname varchar(50) DEFAULT 'Bush',
Lastname varchar(50) DEFAULT 'Green',
Address varchar(50) DEFAULT 'China',
City varchar(50) DEFAULT 'beijing'
)
²åÈëÒ»ÌõÐÅÏ¢
INSERT INTO hello(Id_P) values(01)
½á¹ûÊÇ
×ܽ ......
´íÎóÌáʾ£º
Ö¸¶¨µÄÁ¬½ÓÀàÐÍ“OLEDB”δ±»Ê¶±ðΪÓÐЧµÄÁ¬½Ó¹ÜÀíÆ÷ÀàÐÍ¡£µ±ÊÔͼ´´½¨Î´ÖªÁ¬½ÓÀàÐ͵ÄÁ¬½Ó¹ÜÀíÆ÷ʱ»á·µ»Ø´Ë´íÎó¡£Çë¼ì²éÁ¬½ÓÀàÐÍÃû³ÆµÄƴдÊÇ·ñÕýÈ·¡£
½â¾ö·½·¨£º
sqlserver2005-ÅäÖù¤¾ß-SqlServer configuration manager-SqlServer2005·þÎñ-sqlserver Integration Services£¬ÓÒ»÷-Ñ¡ÔñÊôÐÔ£¬È»ºó° ......
1¡¢ ´æ´¢¹ý³Ì
1£© ¾¡Á¿½«´úÂë¶Î·Åµ½TRY…CATCH…¡£
µ«·²Ê¹ÓÃC#д¹ý´úÂëµÄÈË£¬¶¼ÖªµÀC#ÖÐTRY…CATCH…µÄÔËÐкͳö´íÌø×ªÂß¼£¬¶øSQL Server2005ÖУ¬ÆäÔËÐкͳö´íÌø×ªÂß¼ÓëÔÚC#ÖÐÊÇÒ»Öµġ£TRY…CATCH…ÊÇSQL Server2005ÖÐÐÂÔöµÄ£¬¹¦ÄÜÇ¿´ó£¬ÇҺܺÃÓá£
2£©&nb ......
sql»Ö¸´xp_regread
ɾ³ýµôxp_regreadºó£¬·¢ÏÖÒÔǰµÄ×÷Òµ²»Äܲ鿴£¬Ö»ÄÜÈ¥»Ö¸´ÁË¡£
exec sp_addextendedproc 'Xp_dirtree','xpstar.dll' »Ö¸´ºó·¢ÏÖ²»ÄÜʹÓÃ
ÕÒµ½dbcc addextendedproc ("Xp_regread","xpstar.dll") »¹ÊDz»ÄÜʹÓÃ
ºóÀ´²Å·¢ÏÖ»Ö¸´µÄʱºòÒªÓÃСдdbcc addextended ......