Delphi

Partial Search In Table(BDE)

孤街浪徒 提交于 2020-01-03 04:14:04
问题 I made a database with paradox 7. The usual search I do is a syntax like this: Table.Filter := 'Country=' + QuotedStr(Edit.Text); This returns rows those country field is same as the entered text in edit. when I want to search for countries are beginning by "L" i use this syntax: Table.Filter := 'Country=' + QuotedStr(Edit.Text + '*'); But how can I search for fields those are finished with "L"? this syntax does not work: Table.Filter := 'Country=' + QuotedStr('*' + Edit.Text ); Thanks. 回答1:

How to retrieve a non-terminating xsl:message in MSXML6 and C++/Delphi?

做~自己de王妃 提交于 2020-01-03 03:29:07
问题 I am using the MSXML 6.0 parser for XSL transformation and want to fetch <xsl:message terminate="no"> debug messages. From what I found on the net this seems to be possible in .NET. Is there a way to get the message output when using the COM interface (C++ or Delphi example code would be great)? Update: This is the code I use to do the XSL transformation (pretty straight forward): uses ActiveX, {...} MSXML2_TLB; function TransformMsXmlDocument( XmlDoc, XslDoc: iXmlDomDocument2 ) :

Delphi TIdHTTP POST is very slow vs GET

回眸只為那壹抹淺笑 提交于 2020-01-03 03:27:08
问题 Delphi 2009 I recently switched from multiple GET requests to a single POST which I thought would be more efficient but it has turned out to be much slower. It went from 1-2 seconds to 8-10 seconds and I can't figure out why. example unit Unit4; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP; type TForm4 = class(TForm) d: TIdHTTP; Memo1: TMemo; Button1: TButton;

Error while dynamically loading mapi32.dll

浪子不回头ぞ 提交于 2020-01-03 03:23:05
问题 Our application uses Simple MAPI to send e-mails. One of our clients has problems sending e-mail from a session on his terminal server. The mapi32.dll is loaded with a call to LoadLibrary which succeeds, but then our application tries to get the addresses of the functions MAPILogon , MAPILogOff , MAPISendMail , MAPIFreeBuffer and MAPIResolveName . The problem is that GetProcAddress fails for those functions with an ERROR_ACCESS_DENIED (code: 5) except for MAPIFreeBuffer . It looks like some

How can i create a new instance of a class?

…衆ロ難τιáo~ 提交于 2020-01-03 03:13:08
问题 i have a list of class instances of various kinds. i need to be able to create a new instance of a class without knowing for sure what to create. all the objects involved have the same ancestor. the actual copying of the object's member variables is easy...it's the creation of the new object where i have a problem. admittedly i could do something like this: case MyObjectTypeInstance.MyTypeEnum of obj1: Result:=TObjectType1.Create; obj2: Result:=TObjectType2.Create; obj3: Result:=TObjectType3

Send keys without SendMessage and PostMessage

匆匆过客 提交于 2020-01-03 03:08:05
问题 Is it possible to send keys to a program without SendMessage and PostMessage API? 回答1: The official way to fake input does not involve sending or posting Windows messages directly. Instead you are meant to call SendInput. When you use SendInput it is indistinguishable from actually pressing the real keys. When you call SendInput to fake keyboard input, the system ultimately posts messages to the message queue of the foreground thread that created the window with the keyboard focus. 来源: https:

XE4/FireDAC uADStanCipher not found error

痴心易碎 提交于 2020-01-03 03:07:08
问题 When I try to compile my XE4/FireDAC project I receive the following error: [dcc32 Fatal Error] uADPhysSQLiteCli.pas(992): F1026 File not found: '<project path>\uADStanCipher.dcu' I have searched for solutions and it seems that the file is not distributed with the standard FireDAC installer due to export restrictions. Some Google results refer to the link http://cc.embarcadero.com/item/29376. It appears that the link should allow you to download the correct file. Unfortunately I receive an

F2051 Unit JclUnitVersioning was compiled with a different version of System.Contnrs.TObjectList.Remove

北城以北 提交于 2020-01-03 03:07:06
问题 I'm migrating a Delphi 2 project to RAD Studio XE2. When I try to compile I get [DCC Fatal Error] MyUnit.pas(9): F2051 Unit JclUnitVersioning was compiled with a different version of System.Contnrs.TObjectList.Remove at the following row: unit MyUnit; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, DB, DBTables, TB97, ExtCtrls, Grids, DBGrids, Vcl.Mask, JvExMask, Vcl.DBLookup, JvToolEdit, {<-- error here} TB97Ctls; {...} I tried uninstalling

virtualtreeview add icon fail

微笑、不失礼 提交于 2020-01-03 03:04:11
问题 here my simple code to add filename and their associated icon to virtualtreeview PFileInfoRec = ^TFileInfoRec; TFileInfoRec = record strict private vFullPath: string; vFileName: string; vFileIcon: hIcon; public constructor Create(const FullPath: string); property FullPath: string read vFullPath; property FileNam : string read vFileName; property FileIcon: hIcon read vFileIcon; end; after i got the icon handle using shGetFileInfo Api procedure TMainFrm.VSTGetImageIndex(Sender: TBaseVirtualTree

virtualtreeview add icon fail

故事扮演 提交于 2020-01-03 03:04:09
问题 here my simple code to add filename and their associated icon to virtualtreeview PFileInfoRec = ^TFileInfoRec; TFileInfoRec = record strict private vFullPath: string; vFileName: string; vFileIcon: hIcon; public constructor Create(const FullPath: string); property FullPath: string read vFullPath; property FileNam : string read vFileName; property FileIcon: hIcon read vFileIcon; end; after i got the icon handle using shGetFileInfo Api procedure TMainFrm.VSTGetImageIndex(Sender: TBaseVirtualTree