Thanks Jiri,

Using the method you suggested solved this issue.
What I did was this:

AppDomain.CurrentDomain.SetData("DataDirectory", My
.Application.Info.DirectoryPath)

The appication that uses the embedded firebird is called from another
assembly and without the above line it was not working.

This is my connectionstring and it is working now at runtime but not at
design time (from within query builder to manage dataadapters)
User=SYSDBA;Password=masterkey;DataSource=localhost;Database=|DataDirectory|\Database.fdb;Dialect=3;Charset=UTF8;ServerType=1;pooling=false;

Is it possible to set the |DataDirectory| path at design time so that Visual
Studio Query builder translates |DataDirectory| to the correct path of
my project bin/Debug folder?
Στις 27 Φεβρουαρίου 2010 12:02 π.μ., ο χρήστης Jiri Cincura <
[email protected]> έγραψε:

> 2010/2/26 Γιάννης Μπουρκέλης <[email protected]>:
> > Hello,
> > I am trying to connect to an embedded database using the |DataDirectory|
> > keyword but without success.
>
> Depends on what you expect or in what environment your application is
> running respectively. The |DataDirectory| is defined as
> AppDomain.CurrentDomain.GetData("DataDirectory"). So don't interchange
> it with current working directory or directory where executable is
> placed - these can be different and you can retrieve both in runtime
> as well. And you can push the value there using AppDomain.SetData. If
> the DataDirectory isn't set (by you or the surrounding environment
> like ASP.NET <http://asp.net/>) the empty string is used.
>
> > Is the |DataDirectory| keyword supported in Net Firebird provider v2.5.1?
>
> Yes. And I would also recommend to upgrade to 2.5.2.
>
> --
> Jiri {x2} Cincura (CTO x2develop.com)
> http://blog.cincura.net/ | 
> http://www.ID3renamer.com<http://www.id3renamer.com/>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Firebird-net-provider mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to