上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 32 下一页
摘要: 学习Spring+Hibernate,非常强大的框架,为了追新,就直接从最高版本开始学习了,这要冒很大的风险,因为网上可查到的资料大多是针对旧版本的,比如Spring3,Hibernate3。根据我的测试,记录如下:1.Spring4事务必须针对接口,否则报错。(之前可以不针对接口?)如果没有事务,... 阅读全文
posted @ 2013-11-14 08:38 garfieldtom 阅读(23242) 评论(3) 推荐(1)
摘要: 1. you just compile your web-service into aar file (not include bean files), copy the aar into axis2\WEB-INF\services.2. all libs hibernate (and jar drivers), you have to copy in axis2\WEB-INF\lib.3. all bean(include xx.hbm.xml files) classes which are must be in axis2\WEB-INF\classes.4. that's 阅读全文
posted @ 2013-09-27 08:53 garfieldtom 阅读(964) 评论(0) 推荐(0)
摘要: 1.关于Hibernate异常:org.hibernate.service.jndi.JndiException: Error parsing JNDI name刚接触Hibernate,调试一个简单的程序报告异常:org.hibernate.service.jndi.JndiException: Error parsing JNDI name 去掉hibernate.cfg.xml中的name属性,异常解除。没有明白是什么原因。2.JDBC for SQL Server的连接描述:com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc:sqlser 阅读全文
posted @ 2013-09-26 10:33 garfieldtom 阅读(432) 评论(0) 推荐(0)
摘要: 在master数据库中执行如下代码declare @i INT declare cur cursor for select spid from sysprocesses where db_name(dbid)= ''Your_Database_Name' open cur fetch next from cur into @i while @@fetch_status=0 begin exec('kill '+@i) fetch next from cur into @i end close cur deallocate cur 阅读全文
posted @ 2013-08-23 09:14 garfieldtom 阅读(3072) 评论(0) 推荐(0)
摘要: 定义一个类:TMyCxGrid = class(TObject) class procedure DrawIndicatorCell( Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean); end;class procedure TMyCxGrid.DrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: Tcx... 阅读全文
posted @ 2013-08-05 16:34 garfieldtom 阅读(1759) 评论(0) 推荐(0)
摘要: 原来使用ado来访问数据库,用在DataSnap中也很方便。后来便一直使用UniDac,可发现UniDac如果用在DataSnap中要比ado麻烦很多,尤其对自增长字段、缺省值的处理上,感觉对DataSnap支持不好(普通C/S应用还是非常好的)。在Unidac官网上看到一个关于处理DataSnap中的AutoInc字段问题,记录在下面,我没有验证。I use DataSnap delphi 2010.UniQuery Component DMLRefresh Can fetch autoinc value,but I cannot use it with datasnap.I use Fol 阅读全文
posted @ 2013-07-18 15:02 garfieldtom 阅读(1380) 评论(0) 推荐(0)
摘要: Delphi的TScrollBox本身并不响应鼠标滚轮事件(不知道为什么),但可以在ScrollBox的鼠标滚动事件中进行控制:procedure TfrmTaskNoteEdit.ScrollBox1MouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);begin if WheelDelta < 0 then SendMessage(scrollBox1.Handle,WM_VSCROLL, SB_L... 阅读全文
posted @ 2013-07-02 12:24 garfieldtom 阅读(3150) 评论(2) 推荐(0)
摘要: 比较简单的方法:1.引用DBXJSON, DBXJSONReflect假设有一个类:type TKid = class FirstName: String; LastName: String; Age: Integer; BornDate: TDateTime; class function CreateAndInitialize: TKid; public function SayHello(sName:string):String; end;{ TKid }class function TKid.CreateAndInitialize: TKid;... 阅读全文
posted @ 2013-06-30 14:17 garfieldtom 阅读(1986) 评论(0) 推荐(1)
摘要: 一,在word中按alt+f11组合键,进入VBA模式二,在左边的工程资源管理器中找到你的word文档,在其上右键/添加/模块三,把下面代码复制,粘贴进去.四,更改数值, 改一下宽度和高度数值(10),点运行(类似播放按钮.)或f5,即可设置文档中全部图片 Sub Macro() Mywidth = 15 '10为图片宽度(厘米) Myheigth = 8 '10为图片高度(厘米) For Each iShape In ActiveDocument.InlineShapes iShape.Height = 28.345 * Myheigth iShape.Widt... 阅读全文
posted @ 2013-06-19 20:31 garfieldtom 阅读(338) 评论(0) 推荐(0)
摘要: NOLOCK(不加锁)此选项被选中时,SQL Server 在读取或修改数据时不加任何锁。 在这种情况下,用户有可能读取到未完成事务(Uncommited Transaction)或回滚(Roll Back)中的数据, 即所谓的“脏数据”。 HOLDLOCK(保持锁) 此选项被选中时,SQL Server 会将此共享锁保持至整个事务结束,而不会在途中释放。 UPDLOCK(修改锁) 此选项被选中时,SQL Server 在读取数据时使用修改锁来代替共享锁,并将此锁保持至整个事务或命令结束。使用此选项能够保证多个进程能同时读取数据但只有该进程能修改数据。 TABLOCK(表锁) 此选项被选中时, 阅读全文
posted @ 2013-06-19 14:39 garfieldtom 阅读(6790) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 32 下一页