Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread Scripts
Wed, May 7 2008 12:24 PMPermanent Link

Allan Brocklehurst
hello;
Stats: EDB 1.09 b3
Delphi 2007

Question:
Is there a way to load a prebuilt script, created in EDBManager, then Import that script  into a EDBScript Component at run time?

if not would't that be a cool feature?

TIA

Allan
Wed, May 7 2008 12:48 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Allan,

<< Is there a way to load a prebuilt script, created in EDBManager, then
Import that script  into a EDBScript Component at run time? >>

Did you try using:

MyEDBScript.SQL.LoadFromFile('c:\test\myscript.sql');

?

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, May 7 2008 1:24 PMPermanent Link

Allan Brocklehurst
Tim..Tim...Tim
If this method is DBISAm as well I'll throw myself on my "if" statement
Thanks

Allan
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Allan,

<< Is there a way to load a prebuilt script, created in EDBManager, then
Import that script  into a EDBScript Component at run time? >>

Did you try using:

MyEDBScript.SQL.LoadFromFile('c:\test\myscript.sql');

?

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, May 7 2008 1:37 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Allan


I must be missing something - isn't that a stored procedure?

Roy Lambert
Wed, May 7 2008 2:03 PMPermanent Link

Allan Brocklehurst
Roy;
Hi.  I just getting into EBD and "Stored procedures" have not come up on the guitar yet.
I have never used Load from file  in DBISAM, even it it exists, but always thought it was a good idea.
I have a little time now; we are between cycles on this project ; and I thought I would convert all of my code to D2007 and EDB.
I'm likeing D2007 and the  more I use EDB  the more I like it  as well

Allan

Roy Lambert <roy.lambert@skynet.co.uk> wrote:

Allan


I must be missing something - isn't that a stored procedure?

Roy Lambert
Wed, May 7 2008 2:29 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Allan


I think Tim may be slightly wrong SmileyRemember the sql property is a strings so SQL.Lines.LoadFromFile will work in DBISAM and ElevateDB

Roy Lambert
Thu, May 8 2008 2:48 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I think Tim may be slightly wrong SmileyRemember the sql property is a
strings so SQL.Lines.LoadFromFile will work in DBISAM and ElevateDB >>

Nope, the SQL property is a TStrings property, therefore it doesn't have a
Lines property itself like a TMemo, etc.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, May 8 2008 7:25 PMPermanent Link

"Stuart"

>
> Nope, the SQL property is a TStrings property, therefore it doesn't
> have a Lines property itself like a TMemo, etc.

TStrings does have a LoadFromFile method itself, but its virtual, so
would need implementing in a descendant class.

Link to RAD Studio 2007 help topic:
ms-help://borland.bds5/delphivclwin32/Classes_TStrings_LoadFromFile.html

Stu
Fri, May 9 2008 3:02 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Stuart,

<< TStrings does have a LoadFromFile method itself, but its virtual, so
would need implementing in a descendant class. >>

Virtual means "overridable", not "need to implement", which is what abstract
does.  Perhaps you're thinking of "virtual; abstract" ?   The LoadFromFile
method is indeed implemented in the TStrings class.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, May 9 2008 7:47 PMPermanent Link

"Stuart Kelly"

>
> << TStrings does have a LoadFromFile method itself, but its virtual,
> so would need implementing in a descendant class. >>
>
> Virtual means "overridable", not "need to implement", which is what
> abstract does.  Perhaps you're thinking of "virtual; abstract" ?
> The LoadFromFile method is indeed implemented in the TStrings class.

Yeah sorry your right.  I thought it was virtual abstract.   

I miss read the Delphi declaration.  I use C++ and PHP at work and
after a while, all the languages murge into one.

Stu
Image