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

Ò»¸öʵÏÖÁ˺ÍÊý¾Ý¿â´ò½»µÀµÄÔ´Îļþ£¨×é×°sqlÓï¾ä°æ£©

package com.itcast.service.base;
import java.util.LinkedHashMap;
import javax.persistence.Entity;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.itcast.util.QueryResult;
/**
 * Õë¶ÔËùÓÐʵÌåbeanµÄÒ»¸ö³éÏóÀ࣬ËùÓеÄʵÌåbean°üÀ¨ProductType,ProductµÈµÈ
 * @author lucky
 *
 */
@Transactional
public abstract class DaoSupport implements DAO {
 
 @PersistenceContext protected EntityManager em;
 
 //µ÷ÓÃÏÂÃæµÄpublic <T> void delete(Class<T> entityClass,Object[] entityids·½·¨
 public <T> void delete(Class<T> entityClass,Object entityid) {
  delete(entityClass,new Object[]{entityid});
 }
 public <T> void delete(Class<T> entityClass,Object[] entityids) {
  for(Object id:entityids){
   em.remove(em.getReference(entityClass, id));
  }
 }
 @Transactional(readOnly=true,propagation=Propagation.NOT_SUPPORTED)//˵Ã÷ÔÚÖ´Ðи÷½·¨µÄʱºò²»ÐèÒª½øÐÐÊÂÎñ´¦Àí
 public <T> T find(Class<T> entityClass, Object entityid) {
  return em.find(entityClass, entityid);
 }
 /**
  * ¿ÉÒÔ×Ô¶¯¹ÜÀïÖ÷¼üidµÄÉú³É£¬µ«Ç°ÌáÊÇidÊÇ×Ô¶¯Éú³ÉµÄ
  * ÈôidÊÇuuidµÄ»°£¬jpa¾Í²»Ö§³Ö×Ô¶¯¹ÜÀíÖ𽥵ŦÄÜ£¬×ÓÀà¾Í±ØÐëÖØд¸Ã·½·¨£¬ÊÖ¶¯Ìí¼ÓÖ÷¼ü
  */
 public  void save(Object entity) {
  em.persist(entity);
 }
 
 public void update(Object entity) {
  em.merge(entity);
 }
 
 @SuppressWarnings("unchecked")
 @Transactional(readOnly=true,propagation=Propagation.NOT_SUPPORTED)
 /**
  * ²éѯµÄÖÕ¼«×îÇ¿°æ£¬¼È¿ÉÒÔ·ÖÒ³£¬ÓÖ¿ÉÒÔ°´Ðò²éѯ£¬»¹¿ÉÒÔÓвéѯÌõ¼þ£¬ÆäËûµÄ²éѯ¶¼Ê¹ÓÃÕâ¸ö²éѯ·½·¨
  * orderby Óï¾ä¸ñʽ£ºorder by key1 asc


Ïà¹ØÎĵµ£º

Sql µãµÎ

ID int identity(1,1) primary key ×Ô¶¯Ôö³¤,Ö÷¼ü
EXEC sp_rename 'login_info','PDI_login_info'  Ö´Ðд洢¹ý³Ì sp_rename , ½«login_info±íÃû ¸ü¸ÄΪ PDI_login_info
SET   XACT_ABORT  {ON|OFF} Èç¹ûÊÂÎñÖз¢Éú´íÎó£¬on   Ôò»áÖÕÖ¹Õû¸öÊÂÎñµÄÖ´ÐУ¬Èç¹ûOFF£¬¼ÌÐø´íÎóµÄÏÂÃæÒ»¾ä  
SET &nbs ......

MySQL ×Ö·û¼¯µ¼ÖÂSQLÁ¬½ÓÖ®ºóÖÐÎÄÂÒÂëµÄÎÊÌ⣡

character-set-server = GB2312
collation-server = latin1_general_ci
MySQL×Ö·û¼¯ GBK¡¢GB2312¡¢UTF8Çø±ð ½â¾ö MYSQLÖÐÎÄÂÒÂëÎÊÌâ ÊÕ²Ø
MySQLÖÐÉæ¼°µÄ¼¸¸ö×Ö·û¼¯
character-set-server/default-character-set£º·þÎñÆ÷×Ö·û¼¯£¬Ä¬ÈÏÇé¿öÏÂËù²ÉÓõġ£
character-set-database£ºÊý¾Ý¿â×Ö·û¼¯¡£
character-set-table£ºÊ ......

½«accessµ¼ÈëSQL server

Ò»¡¢SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡¡ð1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡¡ð2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºóÑ¡Ôñ  czdImport Dat ......

SQL ServerÆóÒµ°æ/±ê×¼°æ/¸öÈË°æµÄÇø±ð

 SQL ServerÆóÒµ°æ/±ê×¼°æ/¸öÈË°æµÄÇø±ð
http://blog.163.com/meteor_zc/blog/static/33150220200811291738603/
SQL ServerÆóÒµ°æ/±ê×¼°æ/¸öÈË°æµÄÇø±ð£¿--Î÷²¿EÍøweste.net¡¡2008-12-29 01:07
·ÖÀࣺĬÈÏ·ÖÀà ×ֺţº ´ó´ó  ÖÐÖР СС SQL ServerÆóÒµ°æ/±ê×¼°æ/¸öÈË°æµÄÇø±ð£¿
¡¡¡¡¶ÔÓÚнӴ¥SQLÊý¾Ý¿â ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ