1 (edited by Montenegr0 2015-10-12 14:53:10)

Topic: DBfile default value

can i have a DBfile that links to a folder, with a default path to that folder? (for example: C:\Test\)

for when i need to link this DBfile to a folder inside that folder (C:\Test\test1) i don´t need to search the entire way to there.

Re: DBfile default value

You can use property dbInitialDir

Example:

Form1.DBFile1.dbInitialDir := 'c:\Test'

Allows you to specify the default path for dialogue open and save the file.

Dmitry.

Re: DBfile default value

can let the user that using the application choose the path  himself to store files or picture ?

Re: DBfile default value

This might be possible using a parameter form in your application. You would have to replace 'c:\Test' by a SQL query like for a variable I guess. Master Dmitry may have a better idea, though big_smile

Re: DBfile default value

it says that dbInitialDir is a undeclared identifier.

Re: DBfile default value

now i see that is becuse of the version that i'm using, what is the latest free version?

Re: DBfile default value

Montenegr0 wrote:

now i see that is becuse of the version that i'm using, what is the latest free version?

1.44

Dmitry.

Re: DBfile default value

And there is any way to go around with this? Anything to implement that have the same efect?

Re: DBfile default value

Unfortunately no.

Dmitry.

Re: DBfile default value

And what if i have a button to open a directory? Is it possible?

Re: DBfile default value

Montenegr0 wrote:

And what if i have a button to open a directory? Is it possible?

Script:

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
var
    sDirectory: string;
begin
    if SelectDirectory('Caption','c:\', sDirectory) then
    begin
        ShowMessage('Selected: ' + sDirectory);
    end;
end;
Dmitry.