delphi-2009

Delphi - MySQL Best Data aware components to use

I need my application to connect to my web server's MySQL database, what is the best option for this. Perfered Data aware Component. I tried zeos 7, but I keep getting the error: SQL error: Client does not support authentication protocol requested by server; consider upgrading MySQL client and have not been able to fix it. Thanks -Br...

Delphi 2009 - how can install the system library units - SysUtils.pas & so on?

I've installed RAD Studio 2009 for Delphi & I want to be able to step in the system library units, such as SysUtils.pas & alike, but it seems that they where not installed with the IDE. Is there any installation option to do this? Appreciate any help with this issue. ...

How to check if TypeIdenitifier(T) is an Object?

I'm creating a generic list class that has a member of type Array(Array of ). The problem is the class destruction,because the class is supposed to be used for types from byte to types inheriting TObject. Specifically: destructor Destroy; var elem:T; begin /*if(T is Tobject) then //Check if T inherits TObject {Compiler error!} f...

Delphi - Is there a better way to get state abbreviations from state names

const states : array [0..49,0..1] of string = ( ('Alabama','AL'), ('Montana','MT'), ('Alaska','AK'), ('Nebraska','NE'), ('Arizona','AZ'), ('Nevada','NV'), ('Arkansas','AR'), ('New Hampshire','NH'), ('California','CA'), ('New Jersey','NJ'), ('Colorado','CO'), ('New Mexico','NM'), ('Connecticut','CT'), ('New York','NY'), ('Delaware','DE')...

Best Lightweight HTML Parser for Delphi

I need to parse out the values from some data from select boxes. Example: <option value="1">Apple</option><option value="2">Chicken</option> Usage: If option = apple then get value. Any suggestions? ...

how can i see how much of the stack space is currently used in my delphi app?

how can i see how much of the stack space is currently used in my delphi app? i had a very strange error that sounds like stack trouble. i'd like to add it to my app's log to get some idea how much stack space is in use/remaining. using the debugger is probably not so great because the routine can be called many times. thank you! ...

How to Create a Simple Dictation Pad in Delphi2009+Vista

the code are not so complecated.. private { Private declarations } SpSharedRecoContext1 : TSpSharedRecoContext; fMyGrammar : ISpeechRecoGrammar; procedure SpSharedRecoContext1Recognition(ASender: TObject; StreamNumber: Integer; StreamPosition: OleVariant; ...

Delphi firebird autoinc

How do I make an autoinc field in firebird with Zeos. -Brad ...

Delphi : Restore a pre-design tabsheet after user has closed it...

Hello, I have a tPageControl on a form, and have made a nice 'welcome page' as a new ttabsheet at design time for the user to start off with. However, if the user closes this tab, I would like the option to bring it back, as it was in originally (much like the welcome page in the Delphi IDE). This seems like a simple problem... When th...

KaZip for C++Builder2009/Delphi

Hi. I have download and install KaZip2.0 on C++Builder2009 (with little minor changes => only set type String to AnsiString). I have write: KAZip1->FileName = "test.zip"; KAZip1->CreateZip("test.zip"); KAZip1->Active = true; KAZip1->Entries->AddFile("pack\\text.txt","xxx.txt"); KAZip1->Active = false; KAZip1->Close(); now he create a...

Anonymous method as function result

What I want to do is to assign an anonymous method which I get as a function result to a variable of the same type. Delphi complains about not beeing able to do the assignement. Obviously Delphi things I want to assign the "GetListener" function instead of the result of that same function. Any help with this is very much appreciated. ...

Array with multiple types?

Hello, I was wondering if there is a way to make an array which would have multiple types of data fields. So far I was using aMyArray: array of array [0..1] of TPoint; But now, it is not enough for me. I need to add 3 more elements to the existing 2 "Point" elements making it an array like aMyArray: array of (TPoint,TPoint,real,real,r...

Convert Delphi 7 code to work with Delphi 2009

I have a String that I needed access to the first character of, so I used stringname[1]. With the unicode support this no longer works. I get an error: [DCC Error] sndkey32.pas(420): E2010 Incompatible types: 'Char' and 'AnsiChar' Example code: //vkKeyScan from the windows unit var KeyString : String[20]; MKey : Word; mkey:=vkKey...

Firebird Insert Distinct Data Using ZeosLib and Delphi

I'm using Zeos 7, and Delphi 2009 and want to check to see if a value is already in the database under a specific field before I post the data to the database. Example: Field Keyword Values of Cheese, Mouse, Trap tblkeywordKEYWORD.Value = Cheese What is wrong with the following? And is there a better way? zQueryKeyword.SQL.Add('IF...

THttprio onBeforeExecute changing the soapRequest

I've imported some wsdl for a project. i want to change the SoapRequest on HttpRio onBeforeExecute event, but as i changed the request, im getting some errors how can i change the request xml file with stringReplace function on this event. i've tried to change the size of stream, i ve changed the encoding etc. but anyway it didnt work. ...

Delphi 2009: How do I prevent network application from leaking critical section?

As part of Vista certification, Microsoft wants to make sure that an application exits without holding on to a lock (critical section): TEST CASE 31. Verify application does not break into a debugger with the specified AppVerifier checks (Req:3.2) As it turns out, network applications built using Delphi 2009 does break into the de...

Trapping errors in TClientDataSet.CommandText

I have a TClientDataSet connected to a TDataSetProvider, which in turn is connected to a TAdsQuery. I set the SQL command and then open the ClientDataset something like this: try CDS.CommandText := 'SELECT * FROM tablename WHERE fieldname = 1'; CDS.Open except // trap exception here - this never gets executed! end; If the SQL st...

How to automize multiple projects build process by including digital signature of exe in Delphi?

After building a project group of 2 projects with Delphi (2009) I digitally sign the 2 exes using InstallAware Code signing, an exe that shipped with Delphi 2009. How is it possible to automize the digital signature, so when I build I can also attach digital signature. For digital signing I use a pvk (private key) file and an spc (Sw ...

Delphi 2010 Datasnap - Design Query

I am investigating moving a thick client SQL based Delphi application to Multi Tier thin clients, and have been looking at using Datasnap in Delphi 2010. I have worked through the White Paper written by Bob Swart and extended this further. My main question really is that I want to make the server side efficient in terms of connections ...

Error in my OO Generics design. How do I workaround it?

I get "E2511 Type parameter 'T' must be a class type" on the third class. type TSomeClass=class end; ParentParentClass<T>=class end; ParentClass<T: class> = class(ParentParentClass<T>) end; ChildClass<T: TSomeClass> = class(ParentClass<T>) end; I'm trying to write a lite Generic Array wrapper for any data type(ParentParentClass) ,...