Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Create a Store Dynamically
Tue, Mar 24 2009 6:09 AMPermanent Link

Peter Thorne
This will create OK:

CREATE PROCEDURE CreateBackupStore(IN "FolderLocation" VARCHAR)
BEGIN
 DECLARE Stmt STATEMENT;
 PREPARE Stmt FROM 'CREATE STORE "Backups" AS LOCAL PATH ?';
 EXECUTE Stmt USING FolderLocation;
END;

but it won't execute (throws a 700 error, not liking the parameter). Presumably (he says cautiously) there is a way of achieving the same result?
Please advise.

Many thanks as usual ...

Peter
Tue, Mar 24 2009 6:34 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Peter,

> Presumably (he says cautiously) there is a way of achieving the same
> result?

Yes, there is:

CREATE PROCEDURE CreateBackupStore(IN "FolderLocation" VARCHAR)
BEGIN
 EXECUTE IMMEDIATE
   'CREATE STORE "Backups" AS LOCAL PATH ''' + FolderLocation + '''';
END;

--
Fernando Dias
[Team Elevate]

Tue, Mar 24 2009 7:03 AMPermanent Link

Peter Thorne
"Fernando Dias" wrote:

< Yes, there is:

CREATE PROCEDURE CreateBackupStore(IN "FolderLocation" VARCHAR)
BEGIN
 EXECUTE IMMEDIATE
   'CREATE STORE "Backups" AS LOCAL PATH ''' + FolderLocation + '''';
END; >

Great. Thanks Fernando.
Image