|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
多谢指点,其实我对.net和ruby也不是很了解,对与java也只是刚起步的阶段,只是在学习中有了点想法就写出来了,现在俺本科还没毕业,所以对大型项目基本上也没有什么经验。
Problem:Couldnotloadobject:[Microsoft][SQLServer2000DriverforJDBC]Cantstartaclonedconnectionwhileinmanualtransactionmode.===============================================
Solve:
Ifyoupass"SelectMethod=cursor"attributeinconnectiourl,willallowmorethanoneactivestatementperconnection."jdbc:microsoft:sqlserver://localhost:1433;SelectMethod=cursor;","user","pwd"Thereasonforthisis;WhenSelectMethodissettodirect,SQLServerdoesnotsupportmultipleactivestatementsonasingleconnectionwithinatransaction;however,whenauto-commitmodeisenabled(thedefault),theMicrosoftSQLServerJDBCdriverprovidestheabilitytohavemultipleJDBCstatementsopenonasingleJDBCconnection.ThisisdonebycloningphysicalSQLServerconnectionsasneeded.ToavoidcloningphysicalSQLServerconnectionsinthiscircumstance,youshouldcreateonlyoneStatement,PreparedStatement,CallableStatement,orDatabaseMetaDataobjectperJDBCConnectionobject.Besuretoinvokethe"close"methodsontheseobjectswhenyouarefinishedwiththem,thatis,beforecreatinganotherobjectofthetypesdescribed.
其实你不用Struts,spring这些工具,直接用jsp,servlet能够很方便地写出来,而且,可以根据个人的水平、爱好,有很多方案。而struts,spring这些工具的出来。 |
|