Menu

#48 Cannot assign a TgaSQLQuoteInfoItem to a TgaSQLQuoteInfoItem

open
nobody
None
5
2005-09-02
2005-09-02
No

Steps to reproduce an error:
1. Create a new application project
2. Create a form Form1 and place a
TgaAdvancedSQLParser on it (i think that
TgaBasicSQLParser works too).
3. Add a new item to its SymbolQuotes (maybe, it's
unnecessary).
4. Save the project
5. Inherit a form Form2 from Form1.
6. Try to save it. It gives the mentioned error

I've fixed this by adding
procedure AssignTo(Dest: TPersistent); override;
to the protected part of TgaSQLQuoteInfoItem interface
with the following implementaion:

procedure TgaSQLQuoteInfoItem.AssignTo(Dest:
TPersistent);
var dst: TgaSQLQuoteInfoItem;
begin
if Dest is TgaSQLQuoteInfoItem then
begin
dst:=TgaSQLQuoteInfoItem(Dest);
dst.EndDelimitier:=FEndDelimitier;
dst.QuotedIdentifierType:=FQuotedIdentifierType;
dst.StartDelimitier:=FStartDelimitier;
end
else
inherited AssignTo(Dest);
end;

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.