Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread ALTER DATABASE
Tue, Apr 3 2012 4:40 PMPermanent Link

Enrico Pettenati

I need to alter a database.
I found to use a SQL config sequence or a more simple single line procedure. What's the better way ?

I tried to use the following procedure:
sPath := 'F:\Mydata';
with DataMain.DataModule1.EDBSession1s do Execute('ALTER DATABASE "MyDataBase PATH ' + sPath);

Can be a sintax error ?
using the following procedure al works correctly
with DataMain.DataModule1.EDBSession1 do Execute('ALTER DATABASE MyDataBase ' + 'PATH ''F:\MyData''');
Thanks
Wed, Apr 4 2012 3:43 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Enrico

>I tried to use the following procedure:
>sPath := 'F:\Mydata';
>with DataMain.DataModule1.EDBSession1s do Execute('ALTER DATABASE "MyDataBase PATH ' + sPath);

You seem to be missing the closing " after MyDataBase

Roy Lambert [Team Elevate]
Thu, Apr 5 2012 2:29 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Enrico,

<< I tried to use the following procedure:
sPath := 'F:\Mydata';
with DataMain.DataModule1.EDBSession1s do Execute('ALTER DATABASE
"MyDataBase PATH ' + sPath); >>

This is the correct way:

sPath := 'F:\Mydata';
with DataMain.DataModule1.EDBSession1s do Execute('ALTER DATABASE
"MyDataBase" PATH ' + Engine.QuotedSQLStr(sPath));

--
Tim Young
Elevate Software
www.elevatesoft.com

Image