delphi

Anyone that has a partial XSD that describes the METADATA section of Delphi TClientDataSet XML files?

I know that you cannot fully describe the XML that the TClientDataSet with an XSD schema, as the ROW elements have attributes that have names that vary with the contents. However, the METADATA section of such an XML should be. So: is there anyone having a (partial) XSD that describes the METADATA portion of the XML that can be saved wi...

Why can't my program find its DLLs on Vista 64?

I recently got a new laptop. Unfortunately, it came with Vista. It's been one big hassle getting it to work, and the comp has hardware components for which there are no XP drivers, so I can't "upgrade" to an OS that actually works. I've mostly gotten things working, but one particularly odd problem has me stumped. I installed Delphi and...

Delphi SMTP component that supports UTF-8 or Unicode

It appears the Indy 10 SMTP component shipped with Delphi 2009 do not properly support unicode in the subject and body. Does anyone know of a good alternative, or has anyone made the necessary changes to Indy10 to solve this issue? Update: Thanks for all the answers, I've done a bit of investigation, and thought I might be able to so...

How to reuse a (Delphi) OLE server with a second client?

I wrote an OLE automation server (using Delphi). I usually start the OLE server manually and use it as a normal application. From time to time I start a client, which automatically connect to the existing OLE Server. When I terminate the client, the server does not terminate (at least when it was started manually before the client) but...

ADOQuery Master/Detail

Data: Nate Pond - LakeMaps.Lake_Name Brook trout - Species.Species_Name Creek chub Golden shiner Black Pond Brook trout Brown bullhead Common shiner Lake Placid Lake trout Smallmouth bass Yellow perch MDB Database ADoTable1 = LakeMaps MASTER ADOTable2 = Species DETAIL Relationship LakeMaps Table LakeMaps.Field[0] = L...

TADO Auto Log-in

I tried to set username to blank from ADO connectionstring but when running the application login dialog is always shown? Blank Password is checked, ...

Delphi 2009 RawByteString vagaries

Suppose that for some perverse reason you want to display the raw byte contents of a UTF8String. var utf8Str : UTF8String; begin utf8Str := '€ąćęłńóśźż'; end; (1) This doesn't do, it displays the readable form: memo1.Lines.Add( RawByteString( utf8Str )); // output: '€ąćęłńóśźż' (2) This, however, does "work" - note the conc...

What is the best way to connect to a Mysql database in Delphi

What is the best component to use when connecting to a Mysql 5.1.x in Delphi and why ? ...

How do I fake input for form testing?

I'm building a test harness for my Delphi 2009 app. Testing the logic is fairly simple. Making sure the forms work properly is proving a bit more complicated. I'd like a way to simulate real user input, to open a form, make it think there's a user typing certain things and clicking in certain places, and make sure it reacts correctly....

TADO, Access, TNavigator Delete Record Exception

How to solve a TADO, Access, TNavigator Delete Record Exception"Key column information is insufficient or incorrect"? ...

Accessing Variable in Parent Form from OnTimer Event - Getting Exception

I'm getting an exception in an OnTimer event handler (TTimer) that when executed increments an integer variable in the parent form. The timers need to be able to access an incremented integer used as an id. My first question is: How can I tell in Delphi 2007 which code is running in which thread? Is there a way in debug mode to inspec...

Invalid parameter error with TClientdataset

What is the reason for getting an 'invalid parameter error' when calling the CreateDataSet method in a TClientDataSet component. What causes this error. Kind Regards Riaan de Villiers ...

Delphi: Check whether file is in use

I want to write to/delete a file but sometimes I get a crash if the file is in use by another program. How do I check to see whether the file is opened by another process or I can open it for writing? ...

How to link "parallel" class hierarchy?

I've got a little class hierarchy where each class corresponds to a certain TComponent descendent (say base class TDefaultFrobber with descendents TActionFrobber and TMenuItemFrobber, corresponding to TComponent, TCustomAction and TMenuItem, respectively). Now I want a factory (?) function something like this: function CreateFrobber(ACo...

Deleting a temporary directory in Delphi

I have this code showmessage('C:\TEMP\'+openfiles[openfilelist.ItemIndex].ID); if removedir('C:\TEMP\'+openfiles[openfilelist.ItemIndex].ID) then showmessage('Removed') else showmessage('Failed'); the message shows 'C:\TEMP\0' and this directory does exist as the program created it earlier and used files inside it and then later d...

Delphi: How do I stop TAction shortcut keys autorepeating?

I'm using a Delphi TActionList, with Shortcut Keys for some actions. I want to prevent certain actions from being triggered multiple times by keyboard auto-repeat, but I do not want to affect auto-repeat operation globally. What's the best way of doing this? Clarification: I still need to handle multiple fast keypresses - it's only the...

Delphi on the Mac - possible?

I am responsible for a Delphi/Win32 project management application. I have just completed a move to Delphi 2009. More and more US based users want to use the application on their Mac computers, while the majority are Windows users. Are there solutions out there to easily build a Delphi app that will natively run on MacOS? ...

Launching and controlling a new application instance via COM

I'm using C#.NET to launch and control a Delphi-written executable. The Delphi application has a COM interface. I've imported the Delphi executable -- we'll call it DelphiApp.exe -- into Visual Studio as a resource. The following C# code works -- if no other instance of DelphiApp.exe is running: DelphiApp.DelphiAppClass da = new Delp...

Threading DbExpress queries

I have only done "GUI" database access in Delphi with DbExpress components, but now I'd like to execute one query on background. I read some where that TSQLConnection is not thread safe and I have to create new connection for each thread. I see that there's CloneConnection in TSQLConnection, but help claims that new connections are owned...

Where can I define Conditional compilation constants for Delphi Prism?

I've just ported a Web service from Delphi.NET 2006 to Delphi Prism 2009 (running in the Visual Studio 2008 IDE). But I can't find where I'm supposed to set (or unset) the conditional compilation constants! Am I blind, has this option been left out, or is it just not supported in VS? [edit: thanks to Mohammed Nasman for the link] MSDN...