JDBCÁ¬½ÓSQLServer³öÏÖµÄÒì³£
¿Î³ÌÉè¼ÆµÄµÚÒ»²½£º
Óû§µÇ½ģ¿é:¾ÍÕâ¸öСģ¿é°ÑÎÒÕûËÀÁË£¬³öÏÖµÄÎÊÌâÒ»¸ö½Ó×ÅÒ»¸ö£¬×îÖ÷ÒªµÄ¾ÍÊÇÊý¾Ý¿âÁ¬½Ó.
question1.
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
Òì³£ÔÒò£ºÃ»Óе¼Èëµ¼Çý¶¯°üsqljdbc.jar.
question2.
com.microsoft.sqlserver.jdbc.SQLServerException: ûÓÐΪ¼¯³ÉÉí·ÝÑéÖ¤ÅäÖÃÇý¶¯³ÌÐò
Òì³£ÔÒò£º´òsqlserver2005µÄsp3µÄ²¹¶¡£¬È»ºó½«Êý¾Ý¿âÉèÖÃΪÓÃwindows+sqlserverË«ÖØÑéÖ¤¡£
question3.
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]¶ÔÏóÃû ‘xxx’ ÎÞЧ
Òì³£ÔÒò:·ÃÎÊÊý¾Ý¿âµÄÓû§ÓеǼȨÏÞ£¬µ«ÎÞ²Ù×÷±íµÄȨÏÞ
½â¾ö°ì·¨£º
1. ÔÚ[ÆóÒµ¿ØÖÆ̨]´°¿Ú–[Ê÷]×Ó´°¿Ú–[°²È«ÐÔ]×ÓÊ÷–[µÇ¼]ÏîÀォÄãʹÓõĵǽÓû§µÄĬÈÏÊý¾Ý¿âÉèΪÄãËùʹÓõÄÊý
¾Ý¿â¡£
2. ÔÚ[ÆóÒµ¿ØÖÆ̨]´°¿Ú–[Ê÷]×Ó´°¿Ú–[°²È«ÐÔ]×ÓÊ÷–[µÇ¼]ÏîÀïÐÂÔöÒ»¸öµÇ¼Óû§£¨ÔÚÆäÖÐÑ¡ÔñSQL Server Éí·ÝÑéÖ¤
¡¢·þÎñÆ÷½ÇÉ«ºÍÒª·ÃÎʵÄÊý¾Ý¿â£©£¬ÒÔºó±ã¿ÉÓÃЩÐÂÔöÓû§·ÃÎÊÄã¹´Ñ¡µÄÊý¾Ý¿âÁË¡£
question4.
java.sMS-sql 2005 ''xxx'' (Êý¾Ý¿â ''xxx''£¬¼Ü¹¹ ''dbo'')µÄ SELECT ȨÏÞ
Òì³£ÔÒò:Sql server 2005 ĬÈÏÉèÖÃϲ»ÔÊÐíÔ¶³ÌµÇ½
1 ÍâΧÉèÖà tcp/ip ºÍ named pipe ͬʱÆôÓÃ
2 ·þÎñÆ÷ --¡µÊôÐÔ --¡µ°²È«ÐÔ --¡µsql server ºÍwindows ÈÏ֤ģʽ ,Êý¾Ý¿â(xxx) --->°²È«ÐÔ---->¼Ü¹¹---->dbo(Êô
ÐÔ)--->ȨÏÞ--->Ìí¼Ó--->ä¯ÀÀ-->
[public]---->¾ßÓÐÊÚÓèȨÏÞ(select)
question5.
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid operation for the current cursor
position.
Òì³£ÔÒò:ResultSetʵÀýresûÓÐÒƶ¯Ö¸ÕëλÖá£Ò»¸öResultSetÖ¸Õë×î³õµÄλÖÃÔÚµÚÒ»Ìõ¼Ç¼֮ǰ£¬µÚÒ»´Îµ÷ÓÃnext·½·¨
ʹµÚÒ»Ìõ¼Ç¼´¦ÓÚµ±Ç°Î»Ö㬵ڶþ´Îµ÷ÓÃnext·½·¨£¬Ê¹µÚ¶þÌõ¼Ç¼´¦ÓÚµ±Ç°Î»Öá£
Ïà¹ØÎĵµ£º
»ù±¾ÅäÖÃ
Ò»¡¢ÎļþϵͳҪÇó£º
1¡¢ÖÁÉÙÓжþ¸ö·ÖÇø£»
2¡¢ÏµÍ³·ÖÇø²»Ð¡ÓÚ10G£»
3¡¢·ÖÇø¸ñʽ±ØÐëÊÇNTFS¡£
¶þ¡¢²¹¶¡°²×°ÒªÇó£º
1¡¢ÏÈ°²×°Íê±ÏWINDOWS 2000 SP4+³å»÷²¨+Õðµ´²¨²¹¶¡£»
2¡¢½«WINDOWS 2000²¹¶¡Éý¼¶µ½×îкó²Å¿É°²×°cluster ºÍSQL Server£»
3¡¢SQL Server²¹¶¡ÐèÉý¼¶µ½Service Pack 3¡£
Èý¡¢ClusterÐÅÏ¢£º
1£ ......
½ñÌìÒ»²»Àä¾²¾Í°ÑsqlserverÊý¾Ý¿â³õʼ»¯ÁË£¬ÔÚÍøÉÏÕÒÁË°ëÌì·¢ÏÖÁ˼¸ÆªÌû×Ó£¬ÊÜÒæ·Çdz£¬¼Ç¼ÏÂ
DB2ÖпÉÒÔʹµÃÊý¾Ý¿â»Ø¸´µ½Ö¸¶¨µÄʱ¼äµã£¬SQL ServerÊý¾Ý¿âµÄRecovery ModelΪfull »òÕßBulk copyµÄʱºò£¬ÊÇ¿ÉÒÔ´ÓÈÕÖ¾À´»Ö¸´Êý¾Ý¿âµÄ¡£Êµ¼ÊÉÏÈÕÖ¾ÖмǼµÄÒ»ÌõÒ»ÌõµÄtransact sqlÓï¾ä£¬»Ö¸´Êý¾Ý¿âµÄʱºò»áredoÕâЩsqlÓï¾ä¡£&nb ......
´æ´¢¹ý³ÌµÄ´´½¨¼°Ê¹ÓÃ(sqlserver 2005)
´´½¨´æ´¢¹ý³Ì¡£´æ´¢¹ý³ÌÊÇÒѱ£´æµÄ Transact-SQL Óï¾ä¼¯ºÏ£¬»ò¶Ô Microsoft .NET Framework ¹«¹²ÓïÑÔÔËÐÐʱ (CLR) ·½·¨µÄÒýÓ㬿ɽÓÊÕ²¢·µ»ØÓû§ÌṩµÄ²ÎÊý¡£¿ÉÒÔ´´½¨¹ý³Ì¹©ÓÀ¾ÃʹÓ㬻òÔÚÒ»¸ö»á»°£¨¾Ö²¿ÁÙʱ¹ý³Ì£©ÖÐÁÙʱʹÓ㬻òÔÚËùÓлỰ£¨È«¾ÖÁÙʱ¹ý³Ì£©ÖÐÁÙʱʹÓá£
Æô¶¯ SQL ......
1¡¢´´½¨Êý¾Ý¿âtestdb
2¡¢´´½¨±ítest
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[test](
[id] [nchar](10) COLLATE Chinese_PRC_CI_AS NULL,
[name] [nchar](10) COLLATE Chinese_PRC_CI_AS NULL,
[sex] [bit] NULL
) ON [PRIMARY]
3¡¢´´½¨Êý¾Ý¿âdb
......
ÊÀʶ´Ã÷½ÔѧÎÊ£¬ÈËÇéÁ·´ï¼´ÎÄÕ¡£×öASPʱ£¬×î³£ÓõÄÊý¾Ý¿â¼´SqlserverÓëAccessÊý¾Ý¿âĪÊôÁË£¡
µ«Ê¹Óûᾳ£·¢ÏֺܶàSQLÖ´ÐеÄÎÊÌâ¡£ÕâÀïÕûÀí³öÖ®¼äµÄ²îÒ죬×ö¸öÊ®´ó²îÒìµÄ×ܽᡣ
ACCESS½á¹¹¼òµ¥ÈÝÒ×´¦Àí£¬¶øÇÒÒ²ÄÜÂú×ã¶àÊýµÄÍøÕ¾³ÌÐòÒªÇó£¬Ò²ÊdzõѧÕßµÄÊÔÅ£µ¶¡£
ACCESSÊÇСÐÍÊý¾Ý¿â£¬¼ÈÈ»ÊÇСÐ;ÍÓÐËû¸ù±¾µÄ¾ÖÏÞÐÔ£º
......