0
I am making a system in Delphi 2010 with Firebird 2.5 that I select a database and I need to pass path location to my Database in my Sqlconnection.
procedure TFormImportDados.btnBuscaArquivoClick(Sender: TObject);
begin
OpenDialog.Execute();
txtArquivo.Text := OpenDialog.FileName;
with SQLCon do
begin
close;
ConnectionName := 'localhost:' + txtArquivo.Text;
DriverName := 'Firebird';
LibraryName := 'dbxfb.dll';
GetDriverFunc := 'getSQLDriverINTERBASE';
VendorLib := 'fbclient.dll';
end;
end;
procedure TFormImportDados.FormShow(Sender: TObject);
begin
SimpleDataSet.Close;
SimpleDataSet.Open;
end;
I don’t know how to do it right.
Rodrigo. Is working by gluing the direct bank path. If I put
'DataBase=localhost: + txtArquivo.Text
' does not work. If I put'DataBase=localhost:C:\Projetos\Delphi\CentralRit\db\BDLIVRO.FDB
' works.– fabricio_wm