仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 3048|回复: 19
打印 上一主题 下一主题

[学习教程] JAVA网页编程之A problem when connect MSSQL with tr...

[复制链接]
分手快乐 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-18 11:49:46 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

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这些工具的出来。
分手快乐 该用户已被删除
沙发
 楼主| 发表于 2015-1-29 06:17:54 | 显示全部楼层
Java是一个纯的面向对象的程序设计语言,它继承了 C++语言面向对象技术的核心。Java舍弃了C ++语言中容易引起错误的指针(以引用取代)、运算符重载(operator overloading)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-5-6 02:20

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表