delphi-2007

How to remove errors (red underlines) in D2007

I have a lot of errors in structure panel. The application compiles and run fine with Delphi 2007. But the code have much code that have red underlines. If I press Ctrl + leftclick on it it finds the original declaration. But it is still annoying to have all those errors. ...

How do you iterate actions contained in a actionmanager - Delphi 2007

I am using D2007 for a project that has a number of actions in an actionmanager that are then used in actiontoolbars and menus. I have also placed them in categories (eg. File, Tools, Input, etc...). I would like to enable/disable individual actions or a group of actions (eg. input) by iterating a list in actionmanager. The actions pr...

Delphi for .NET does not find shared files in the .NET library search directories ("[DCC Error] F1026 File not found)

I have been trying to track down a problem with an installation of RAD Studio 2007 for some time. When compiling an ASP.NET application build with the .NET personability, I get an "[DCC Error] F1026 File not found error, where it reports that it cannot find a particular .dcuil file. The file that is referenced in this error message is ...

WCF services and firewalls... Any issues?

Simple issue. I'm working on a proof-of-concept for an application with additional database connection, so I will create a WCF service to wrap around the database. Multi-user environments will get this service installed on a centralized server with a client application on their local system. These users will automatically have to deal wi...

TypeLib name in Delphi 2007

When editing a type library for a COM DLL, it appears that in Delphi 2007, the type library name is always set to the name of the project. If I go and change that name, the change is ignored and eventually resets to the project name. Back in Delphi 7 I could specify the name of the type library. What is the expected behavior? Should we...

Convert Hi-Ansi chars to Ascii equivalent (é -> e) in Delphi(2007)

Is there a routine available in D2007 to convert the characters in the high range of the ANSI table (>127) to their equivalent ones in pure ASCII (<=127) according to a locale (codepage)? I know some chars cannot translate well but most can, esp. in the 192-255 range: À -> A à -> a Ë -> E ë -> e Ç -> C ç -> c – -> - (that can be trickier...

ShareMem/ string-exchanging with Delphi DLL

Quick one I hope - I'm just about to delve into a Delphi 5 legacy app that makes calls to a DLL (also written in D5), passing a string which the DLL can modify if required. I have the code to both the DLL and the app. Pasted right at the top of the DLL source is a remark about using ShareMem, and it needing to be the first line in the ...

Delphi: Records in Classes

Following situation: type TRec = record Member : Integer; end; TMyClass = class private FRec : TRec; public property Rec : TRec read FRec write FRec; end; The following doesn't work (left side cannot be assigned to), which is okay since TRec is a value type: MyClass.Rec.Member := 0; In D2007 though the fol...

Deployment of SQL Server: installing a second instance?

Simple problem. I'm working on a Delphi 2007/WIN32 application which now uses MS Access as simple data store. I have to modify it to support SQL Server Express, which is easy. These modifications are working so the application can be deployed using either SQL Server or MS Access. (Whatever the user prefers.) I did consider deploying the ...

How to find the unique serial number of a flash device?

I've found several snippets and .pas files that can detect when USB flash drives are inserted and removed. Some give all kind of good information, however what I need is the devices' unique serial number, not the volumes' serial number. My current .pas file (which I don't remember where I found) also seems to detect SD cards (which I li...

The best way to always detect a removable device

In my previous question "How to find the unique serial number of a flash device?" I ended up asking for a way to get the drive letter. That problem is solved. However, my initial question has not been answered. I wanted to be able to tell removable devices (USB drives, SD cards, (external HDDs?), etc.) apart and always be able to recogn...

TDBNavigator unusual behavior with Themes Enabled

I recently experienced some unusual behavior in using a 3rd party Navigator component in Delphi 2007 whereby upon setting the 'Flat' property to True, the buttons didn't remain Flat as they should with Themes Enabled but did so once I unchecked Enable Themes from within my project file and recompiled my program. This obviously didn't see...

How to programmically find the difference between two directories

First off; I am not necessarily looking for Delphi code, spit it out any way you want. I've been searching around (especially here) and found a bit about people looking for ways to compare to directories (inclusive subdirs) though they were using byte-by-byte methods. Second off, I am not looking for a difftool, I am "just" looking for ...

WriteComponentResFile is not including components dynamically added to TTabSheet

I am trying to convert a set of forms that were created with a custom tool to Delphi forms. I am trying to add all the necessary components at runtime and then use WriteComponentResFile to create the DFM file. All of my initial tests looked good until I tried adding a TPageControl and TabSheets. The current forms can have multiple p...

How to separate files from folders?

I have a simple problem. My (Delphi 2007 with Indy 9) application connects to an FTP server to retrieve a list of files. (NLST, not LIST) I then download every file separately for further processing. Unfortunately, the administrators of the FTP site added a subfolder in the folder where the files are located. The current code thinks it'...

Suggestions for a practical User Authentication System?

I hate to re-invent the wheel so I'm looking for an existing solution to create a simple authentication system for my application. I've experimented for a while with using CardSpace or OpenID inside the application but I can't convince management that these would be working solutions. Of course, I could just build a simple login dialog w...

Does the Delphi 2007 for Win32 (Enterprise) help system work under Windows 7 Ultimate 32 bit?

When we select Help / CodeGear Help from the Delphi 2007 for Win32 (Enterprise) menu, we get the error 'Access violation at address 02E85FC7 in module 'htmlhelp2100.bpl'. Read of address FB300182.'. Then when we exit Delphi we get the Windows dialog 'CodeGear RAD Studio for Windows has stopped working'. Selecting a keyword in the edi...

How to extend a TFieldDef in easy and safe way?

Hi guys. I need an advice in problem with TFieldDef. I need to add one additional string property to the TFieldDef called Description. I want to see that property when I iterate over TFieldDefs collection. How to do this in Delphi 2007? Thanks for your time. ...

How to switch database schema's?

I'm working on a Delphi/WIN32 application that uses an SQL Server database as back-end, using ADO to access the data. There are many users who use this application, but one user is using a special setup: they have multiple database schema's and every schema contains the complete datamodel for the application. Every schema also has a data...

[Delphi] LDAP query with FILTER

Suppose i have a following LDAP query: Base DN: OU=Groups,DC=office,DC=domain,DC=org Filter: (member:1.2.840.113556.1.4.1941:=CN=adam smith,OU=Users,DC=office,DC=domain,DC=org) How can I execute it under Delphi(2007)? Examples using ADO seem to have SQL'ish syntax and I do not now how to convert it? ...