Delphi

Firedac select working with Firebird returns no records

混江龙づ霸主 提交于 2020-01-04 05:45:19
问题 Hello I'm working with Firedac (Delphi Seattle) using Firebird (2.5) as a database, when I run this query using a TFDQuery, no records are returned: SELECT ID FROM USERS WHERE PWD = 'êHÆ–!+' The same query within a Database program as IbExpert return one record. Is there some parameter with Firedac components to configure that can solve this issue. Thanks. 回答1: It's in the query string and it's the ! char. By default, query strings are preprocessed, and you must escape constant chars like ! ,

Is it possible to access memory from an application to another ? How?

我的梦境 提交于 2020-01-04 05:24:12
问题 The title is a bit confused. But, I'm trying to do is some thing like: I have button (Button1 from TButton class)in a application. I want to get the pointer value of this button and check it properties from a second application. Some one can say if it is possible ? And if it's not, explain why ? Tks. Re-opening 'cause I got other informations on internet. If I use things like ? ReadProcessMemory Examples: http://www.codeproject.com/KB/threads/int64_memsteal.aspx http://forum.cheatengine.org

Windows API safe termination of thread

China☆狼群 提交于 2020-01-04 05:23:32
问题 I have Delphi application on windows XP. This application works with 100 threads. At some cases i have to terminate thread with fully drops of thread's stack. I looking for function from WinAPI like terminatethread but it not safelly and: Windows Server 2003 and Windows XP/2000: The target thread's initial stack is not freed, causing a resource leak. 回答1: There's no such function. No such function could possibly exist. Windows cannot possibly know which resources are to be tidied up by that

TFrame as Component, IDE changes object to inline on first use

ⅰ亾dé卋堺 提交于 2020-01-04 05:22:33
问题 I have created a Tframe unit with visual and DB controls. I registered the frame as a component using the sprig approach. The TFrame has a few published boolean properties. Everything works OK, except I have noticed that if I start the IDE and open a project that uses that component, the IDE complains about the "unknown" published properties. And if one looks at the DFM, Delphi has changed the definition for the frame within the form it is embedded in from "object ..." to "inline ...". If I

String Truncation on Transfer to ClientDataset

瘦欲@ 提交于 2020-01-04 05:21:14
问题 I'm using Firebird 2.1, DBExpress Driver from DevArt and Delphi 2010. Some of my reports that used to work with Delphi 2006 stopped working and produced an error message indicating that "arithmetic exception, numeric overflow, or string truncation" had occurred. The error occurred at this point in my code: cds.Data := dsProvider.Data; I found the place in my SQL statement that caused the error: iif(ytd.hPayType <> -1,t.sCode, 'NET') sPayType T.sCode is a Varchar(10) field. My conclusion is

Delphi: Maximized Child Form in MDI Application

泪湿孤枕 提交于 2020-01-04 05:20:13
问题 How can I maximize a child window that fits only the client area but not an entire parent window? I don't want that the child window disappears under a main menu or other controls of the parent window. I have this code procedure WMSIZE(var Msg: TMessage); message WM_SIZE; procedure TForm2.WMSIZE(var Msg: TMessage); begin inherited; if Msg.WParam = SIZE_MAXIMIZED then begin ShowWindow(Handle, SW_RESTORE); Left := 0; Top := 0; Width := Form1.ClientWidth - 4; // The BORDER Height := Form1

Delphi ShellExecute not working in Windows 7

六眼飞鱼酱① 提交于 2020-01-04 05:17:39
问题 I just KNOW this is something simple, but I've tried all of the suggestions I could find on this forum, and I still can't get the following ShellExecute statements, which worked perfectly well for four years on XP, to work in Windows 7. Any suggestions gratefully received! ShellExecute(Handle, 'open', PChar('command.com'), PChar('/c ftp -s:c:\checkout\WebFTPParams.txt 91.208.99.4'), Nil, SW_SHOW); ShellExecute(Handle, 'open', PChar('command.com'), PChar('/c ftp -s:c:\checkout\WWFTPParams.txt

Delphi ShellExecute not working in Windows 7

牧云@^-^@ 提交于 2020-01-04 05:17:06
问题 I just KNOW this is something simple, but I've tried all of the suggestions I could find on this forum, and I still can't get the following ShellExecute statements, which worked perfectly well for four years on XP, to work in Windows 7. Any suggestions gratefully received! ShellExecute(Handle, 'open', PChar('command.com'), PChar('/c ftp -s:c:\checkout\WebFTPParams.txt 91.208.99.4'), Nil, SW_SHOW); ShellExecute(Handle, 'open', PChar('command.com'), PChar('/c ftp -s:c:\checkout\WWFTPParams.txt

How to programmatically change the resolution of a specific monitor?

风格不统一 提交于 2020-01-04 05:11:06
问题 How do you programmatically change the resolution of a specific monitor? For instance can the secondary monitor resolution be programmatically changed? 回答1: The following function might be your starting point. It tries to change the resolution of a display device with index specified by the Index parameter (if exists such) to a width and height (in pixels) given by the Width , Height parameters. The function returns True, if the display device with given index is found and the resolution of

What is correct way to structure delphi compound components for stream reading?

。_饼干妹妹 提交于 2020-01-04 04:54:22
问题 I am having trouble reloading a saved compound component in Delphi where the subcomponent (a TChart) appears to be being created twice. When I create my component in code, it works fine. My component is a TPanel hosting a client aligned TChart and I create the single series and its data myself. Here is my code: type TMyChart = class( TPanel ) PRIVATE FChart : TChart; PROTECTED procedure Notification( AComponent : TComponent; Operation : TOperation ); override; PUBLIC constructor Create(