delphi

is possible filter a TClientDataset using a insensitive case?

i need to filter a TClientDataset, actually i'am using this code. if Value<>'' then begin ClientDataSet1.DisableControls; try ClientDataSet1.Filtered := False; ClientDataSet1.Filter := 'Value LIKE ' + QuotedStr('%'+Value+'%'); ClientDataSet1.Filtered := True; finally ClientDataSet...

Would templates (or other technology) support the following construct?

This is kind of a follow-up from my other question. When I first heard about generics, it was before the release of Delphi 2009 (Where they introduced it first). I know it was supported in .Net before that, but I have yet to dig in that realm. Reading about generics, I learned that it allowed class to have a variable argument to it, an...

Delphi Generics > Dictionary with default value

Hi all, I would like to have a dictionary that returns a default value when the search key is not found. Reading from the documentation: Generics.Collections.Tdictionary […] This class provides a mapping […] and initial content. 1 - How? Is there a way to do it ala Python: {1: ‘one’; 2:’two’} ? Generics.Collections.TDictionary.TryGet...

How to use TThread the right way.

Hi. Could you help me please. I'm writing a component (something like TListView), In my component I perform 3 procedures one by one: procedure findFiles(Path:String); // using FindFirst, FindNext procedure ArrangeItems; // assigns Item Position procedure SetIcons; // Loads Images, resizes, adds to ImageList I can not understand ho...

Custom marshaling TDictionary in Delphi

Hello, I need to custom marshal/unmarchal a TDictionary in Delphi (XE). The dictionary is declared as: TMyRecord = record key11: integer; key12: string; ... end; TMyDict: TDictionary<string, TMyRecord>; Now, if i marshal the dictionary without registering a custom converter, the marshaller will put all kind of fields in the JSO...

How i can delete all the records from a TClientDataset at once?

Is possible delete all the records from a TClientDataset at once? ...

Intraweb question about improperly working (radiobutton)?

HI, I created 4 radiobuttons in a intraweb application. One is checked by default, the rest is not. The belong to the same group called group. (I set the group properly of each TIWradiobutton) There is twiimage image which has click event. In that click event, I tried to set the radiobuttons. E.g. radiobutton1.checked:=true; The probl...

how can I disable Delphi's TRibbon "customize quick access toolbar"?

how can I disable/hide Delphi's TRibbon "customize quick access toolbar"? thank you! ...

Windows Visual Themes: Gallery of Parts and States?

Microsoft Windows lets programmers draw GUI elements using the look and feel of the current theme using functions like DrawThemeBackground and DrawThemeText. The elements are specified by Class, Part, and State, as described at the Parts and States page at MSDN. Unfortunately, the page is not very informative (at all!). So the question ...

Delphi 7 tguid compare

Hi, Is any other way to compare 2 TGUID elements, except transform them into strings (the guidtostring function) and after evaluate the expression, in Delphi 7? Best regards, ...

Delphi ADO + bookmarks

hi! I am currently developing an application that uses databases dynamically. meaning it is designed to work with any db, at any time, and any structures. my concern is that I wish to "tag" or bookmark certain records, therefore I will require to use the Filter property to do some searching, and in the end, I wish to delete the filter...

Delphi ADO + MySQL + Developer Express Grid

I have problems using Mysql with MySQL Connector, I can successfully connect to a database on the net via ODBC, and in my grid I can display many records, however in the grid (Developper express) I seem to be unable to scroll. i think it is related to cursor locations etc etc, but I am not sure. also recordcount and recno seems also not...

How do I delete a folder that another process has open?

I created two services. I want to delete a folder, but that folder is used by my first service. When I execute the first service after that I execute the second service it works fine. But when I try to execute both service at the same time it does not work properly. ...

Delphi: Creating Access DB (.mdb) without Ms Access

Hi, Is there a way to create Access databases (.mdb) without actually using Ms Access? I'd like my app to create it instead (when user presses "New Document" on the toolbar). I'm using Delphi 5 Ent. Thanks in advance! :-) ...

Changing the directory of Delphi OpenDialog

A little background of the program: The program uses a tabbed interface to work on multiple files at the same time. I'm trying to change the directory of the OpenDialog so every time I call open a file will show the directory of the file I am working on currently, but even when I set InitialDir to the file's path it always displays the l...

delphi adoconnection econvert error

hi, I have the following code wich is raising an EConvertError - "can not assign TAdoConnection to TAdoConnection" var wTmpADOConn : TADOConnection; begin // Result := nil; try Result := TADOConnection.Create(nil); wTmpADOConn := afunc(aNameConn);//aFunc-Function which returns a pointer to a TADOConnection objec...

How to change Delphi Build configuration?

How to change the Delphi 2009 Build configuration? The only place I see is on top of the Project Options window, anyway I don't feel that the options are applied. ...

Delphi Get the handle of a directory

Using Delphi 07 is it possible to (How do I) get the handle of a directory if I know its path? ...

Thread-safe way to increment and return an integer in Delphi

In a single-threaded application I use code like this: Interface function GetNextUID : integer; Implementation function GetNextUID : integer; const cUID : integer = 0; begin inc( cUID ); result := cUID; end; This could of course be implemented as a singleton object, etc. - I'm just giving the simp...

Documentation on MyBase ?!

Hello, Can anyone provide me a link to a documentation or some examples of MyBase used with Delphi (newer versions) and especially basic operations (adding, modifying, deleting, searching ...) Thank you. ...