随笔分类 -  Delphi

Delphi相关知识
摘要:告诉你一个最快的方法,用SQLServer连接DBF在SQLServer中执行SELECT * into bmkFROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0', 'Data Source="e:\share";User ID=Admin;Password=;Extended properties=dBase 5.0')...bmk这样就可以把e:\share中的bmk.dbf表导入到Sqlserver中,速度是最快的上面这个方法DBF文件必须在服务器上,如果DBF不在服务器上,就用连接串Provider=Microsoft.Jet.OLEDB.4. 阅读全文
posted @ 2010-12-29 13:11 毛小毛 阅读(366) 评论(0) 推荐(0) 编辑
摘要:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo]"localhost"="DBMSSOCN,localhost,5433"上面一段注册表修改即可,等同于客户端网络实用工具配置,localhost可改为目标机器地址,端口:1433-5433 阅读全文
posted @ 2010-12-19 17:08 毛小毛 阅读(2548) 评论(0) 推荐(0) 编辑
摘要:后台使用SQL语句中,经常会关联自定义函数或视图,而CDS(TClientDataSet)对字段校验比较严格,涉及到的自定义函数或视图输出的字段,都会强制改为ReadOnly为True属性。当后台使用UniDAC+CDS,关联视图或自定义函数,为了数据一致性,有可能需要在前台界面上修改CDS相关的自定义函数输出的字段,即便是将 该字段设置为 readonly为false,或将其字段的 FieldDefs属性的attributes的faReadOnly去掉,系统也会抛出一个异常:trying to modify read-only Field。解决问题很简单,将TUniQuery.Options 阅读全文
posted @ 2010-12-19 17:01 毛小毛 阅读(1595) 评论(0) 推荐(0) 编辑
摘要:修改方法,在FormCreate中加入:TabOrder.ControlStyle:=TabOrder.ControlStyle - [csParentBackground];PanTop.ControlStyle := PanTop.ControlStyle - [csParentBackground];即可 阅读全文
posted @ 2010-12-14 09:25 毛小毛 阅读(328) 评论(0) 推荐(0) 编辑
摘要:1、通过IP取MAC地址usesWinSock;Function sendarp(ipaddr:ulong;temp:dword;ulmacaddr:pointer;ulmacaddrleng:pointer) : DWord; StdCall; External 'Iphlpapi.dll' Name 'SendARP';procedure TForm1.Button1Click(Sender:... 阅读全文
posted @ 2010-10-09 09:47 毛小毛 阅读(5535) 评论(2) 推荐(0) 编辑
摘要:GetHDSerialNumber在通过快捷方式点进去会取不到数据。屏蔽红色段即可function tIceLock.LoadKeyFile : Integer;var r : rIceRecord; pa : pIceArray; f : file of aIceArray;begin IsRegistered := false; AssignFile(f,fKeyFileName); {$I-... 阅读全文
posted @ 2009-09-25 09:11 毛小毛 阅读(304) 评论(0) 推荐(0) 编辑
摘要:wwriched.pas找到如下方法,注释如下语句,直接返回truefunction TwwCustomRichEdit.CanCut: boolean;begin //result:= seltext<>''; Mike remove; result := true;end; 阅读全文
posted @ 2009-08-29 10:57 毛小毛 阅读(290) 评论(0) 推荐(0) 编辑
摘要:FASTREPORT中MEMO的wordwrap设为True,使文本自动换行,但当最后一个字为中文时总是出现乱码。怎样才能使最后的字为中文且剩下文本区不足两格时自动换行,避免出现乱码?主要改fr_class.pas中的wrapline过程,其中有一段:else if s[last] = thenOutLine(Copy(s, beg, last - beg)) elseOutLine(Copy(s... 阅读全文
posted @ 2009-08-29 10:51 毛小毛 阅读(4209) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示