SQLÓïÑԵIJ¼¾ÖºÍIllegalArgumentException
ºÍjava.lang.IllegalArgumentException: org.hibernate.QueryException: JPA-style positional param was not an integral ordinalÕ½¶·ÁË°ëÌ죬º¹°¡£¡
ʹÓÃjpa + strut+ hibernate ¾Í±¨org.hibernate.QueryException: JPA-style positional param was not an integral ordinal
Ò»°ã°ÑhqlÓï¾äдÔÚÒ»ÐУ¬»áºÜ³¤£¬ÔÚideÖÐÐèÒªÍ϶¯¹ö¶¯Ìõ²ÅÄܲ鿴¡£ÎªÁË·½±ãÔĶÁ£¬¹Ê¸Ä³É¼¸ÐУº
public List<Resource> getResourceByTag(Tag tag,int start) {
Query query = entityManager.createQuery(
"SELECT r from Resource r WHERE ?1" +
"IN (SELECT t from r.res_tags t)" +
"ORDER BY r.res_update_date DESC");
query.setParameter(1, tag);
query.setFirstResult(start);
query.setMaxResults(Constants.ITEMS_PER_PAGE);
return query.getResultList();
}
È»ºó¾Í±¨´íava.lang.IllegalArgumentException: org.hibernate.QueryException: JPA-style positional param was not an integral ordinal¡£
°¡°¡°¡°¡°¡°¡£¬sqlÖÐÉÙÁ˺ü¸¸ö¿Õ¸ñ£¬¾ÍÔÚ»»Ðеĵط½
ÕýÈ·£º
"from Resource r WHERE ?1 " +
"IN (from r.res_tags) " +
"ORDER BY r.res_update_date DESC");
ÎÞÄεĽÌѵ£¡
Ïà¹ØÎĵµ£º
CyberSavvy ¼áÐÅÈí¼þ×Ô¶¯»¯¿ÉÒÔÈÿͻ§ÇáËÉÏíÊÜÉú»î¡£DataPlace ÊǸù«Ë¾µÄÈí¼þ¼´·þÎñ½â¾ö·½°¸£¬Ò²¿É³Æ֮Ϊ“Êý¾Ý¿â¹¤³§”£¬ËüÄܹ»ÈÃÃæÏò¼¼ÊõÒÔ¼°ÃæÏòÉÌÎñµÄÓû§´´½¨²¢ÐÞ¸Ä×Ô¼ºµÄÊý¾Ý¿â£¬¶øCyberSavvy ¹«Ë¾½«Îª¸ÃÊý¾Ý¿âÌṩÍйܷþÎñ¡£Òò´ËCyberSavvy ¹«Ë¾ÐèÒªÅÍʯ°ã¼á¹ÌµÄÊý¾Ý¿â£¬²¢Í¨¹ýÍòÎÞһʧµÄÊý¾Ý´«Êä»úÖÆÀ´Ö ......
ÁгöTableAÖÐÓеĶøTableBÖÐûÓÐ, ÒÔ¼°BÖÐÓжøAÖÐûÓеļǼ£º
ÆäÖÐÁ½¸ö±íµÄ½á¹¹Ïàͬ£¬Ñ¡ÔñµÄKey¿ÉÒÔ¶à¸ö
Select Key from
( select * from TableA
Union select * from TableB
)
group by Key
having count(Key)=1
ÁгöTableAÖÐÓеĶøTableBÖÐûÓеļǼ£º
Select Key from
( (select * from TableA
Un ......
Student(S#,Sname,Sage,Ssex) ѧÉú±í
Course(C#,Cname,T#) ¿Î³Ì±í
SC(S#,C#,score) ³É¼¨±í
Teacher(T#,Tname) ½Ìʦ±í
ÎÊÌ⣺
1¡¢²éѯ“”¿Î³Ì±È“”¿Î³Ì³É¼¨¸ßµÄËùÓÐѧÉúµÄѧºÅ£»
SELECT a.S# from (SELECT s#,score from SC WHERE C#='001') a,
(SELECT s#,score fr ......
»ñÈ¡SQL ServerµÄµ±Ç°Á¬½ÓÊý
[ת]http://www.cnblogs.com/confach/archive/2006/05/31/414156.html
Ê×ÏÈÉùÃ÷:Õâ¸öÎÊÌâÎÒûÓнâ¾ö
µ±ÍøÓÑÎʵ½ÎÒÕâ¸öÎÊÌâʱ,ÎÒÒ²»¹ÒÔΪºÜ¼òµ¥,ÒÔΪSQL ServerÓ¦¸ÃÌṩÁ˶ÔÓ¦µÄϵͳ±äÁ¿Ê²Ã´µÄ.µ«Êǵ½Ä¿Ç°ÎªÖ¹,ÎÒ»¹Ã»Óеõ½Ò»¸ö±È½ÏºÃµÄ½â¾ö·½°¸.¿ÉÄܼܺòµ¥,,Ö»²»¹ýÎÒ²»ÖªµÀ°ÕÁË.Ï£ÍûÈç´Ë..
......
ÔõôÔö¼ÓSQL ServerÁ¬½ÓÊý
1. ¿´²Ù×÷ƽ̨µÄ連½Ó數ÊǶàÉÙ
¿ØÖÆ̨µÄÊÚ權¿´¿´
2. 進GENERAL¿´¿´SQL SERVER USERS CONNECTIONS
Ôö´ó¼´¿É
sp_configure 'number of connection'
go ......