Delphi 2010, dbExpress, and SQL Server 2005 DB
I am trying to make a connection to a SQL Server 2005 DB using Delphi 2010 & DBExpress.
If I create a standard delphi application and hard code my connection (IT WORKS!):
procedure TForm1.Button1Click(Sender: TObject);
var
Conn: TSQLConnection;
begin
Conn:= TSQLConnection.Create(nil);
...
I found great explanation about the new RTTI in Delphi,but I don't understand one important thing about all I have read - Where can I use that?
What is it supposed to replace?
...
From what I have gathered, one can have both editions of Delphi installed. My concern is that default paths, etc, may get confused especially when installing 3rd party components.
The reason why I want to do this is I have some 3rd party components which have not been updated. Although I have the source files, I'm not knowledgeable enou...
How do I convert the TypeIdenitifier to a class type? I need to use implicit convertion.
type
TMyChildArray<T>=class(TMyArray<T>)
private
FData:Array of T;
procedure AddEnd();
end;
TTypeIdenitifierParentClass=class(TAnotherParentClass)
protected
TestField:Cardinal;
end;
procedure TMyChildArray<T>.A...
I'm trying to create some classes that allow me to retrieve and manipulate a set of backups my application will create and manage.
I've come up with the following code (not tested yet), but I'm not sure if it's the best way of accomplishing this or if there's any easier/better way. I'm using Delphi 2010.
I have a class that holds the b...
We are currently upgrading from Delphi 7 to Delphi 2010. With Delphi 7 we use Source Connection to integrate Delphi 7 with TFS, but there does not look like there is going to be a Delphi 2010 version in time. Is there any other integration option out there?
...
Climbing the learning mountain of TVirtualTreeView, I'm attempting to create a custom descendant that ensures that, when the control is resized, the width of the last column exactly fills control's width without requiring a horizontal scroll bar.
I see a number of items (a method and a number of events) pertaining to "AutoFitColumns", b...
Let me preface this by saying I'm fairly new to Unit Testing, Mocks, Stubs, Etc...
I've installed Delphi-Mock-Wizard. When I select a unit and "Generate Mock", a new unit is created but it's very basic and not anything what I understand Mocks to be.
unit Unit1;
(** WARNING -
AUTO-GENERATED MOCK! Change this
unit if you ...
I played with attributes and assumed that they are inherited but it doesn't seem so:
type
[MyAttribute]
TClass1 = class
end;
TClass2 = class(TClass1)
end;
TClass2 doesn't have the Attribute "MyAttribute" although it inherits from Class1. Is there any possibility to make an attribute inheritable? Or do I have to go up the cl...
I'm trying to build a debug version of rtl140.bpl to make debugging apps with runtime packages easier. I built the DPK and ran DCC32 on it, and it gets a ways in, then dies.
C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\source\Win32\rtl\sys\Variants.pas(1072) Fatal: F2092 Program or unit 'Variants' recursively uses itself
But look...
I have a application that like firefox, can be enhanced from plugins available from internet.
Now, I want to provide in Delphi (2010) a dialog similar to the download from firefox. I have no skills in build graphical controls.
Using the standard controls of Delphi, what could be the best way... using a TListView/TStringGrid with custom...
I have imported the ShockWave flash Activex Control in my Delphi project. I can manipulate All the properties of a Flash movie file. But I need to define my own Parameters in the my own Flash file and Manipulate those parameters in the Delphi project. I know that passing parameters to a flash file is possible in the HTML script. But my p...
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')...
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?
...
Okay, this might be confusing. What I'm trying to do is use an enumerator to only return certain items in a generic list based on class type.
Given the following hierarchy:
type
TShapeClass = class of TShape;
TShape = class(TObject)
private
FId: Integer;
public
function ToString: string; override;
...
One would think that there would be a Font property for MainMenu, since there is one for just about everything else e.g. Buttons, Labels, etc.
...
I try to write a kind of object/record serializer with Delphi 2010 and wonder if there is a way to detect, if a record is a variant record. E.g. the TRect record as defined in Types.pas:
TRect = record
case Integer of
0: (Left, Top, Right, Bottom: Longint);
1: (TopLeft, BottomRight: TPoint);
end;
As my serializer should work recu...
I have legacy code (I didn't write it) that always included the encoding attribute, but recompiling it to D2010, TXMLDocument doesn't include the enconding anymore. Because the XML data have accented characters both on tags and data, TXMLDocument.LoadFromFile simply throws EDOMParseErros saying that an invalid character is found on the f...
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...
Has anyone an idea, how I can make TValue using a reference to the original data? In my serialization project, I use (as suggested in XML-Serialization) a generic serializer which stores TValues in an internal tree-structure (similar to the MemberMap in the example).
This member-tree should also be used to create a dynamic setup form an...