Ne arayalım?

ARAMIZA KATILIN

BİZE ULAŞIN

Adres:

E-posta:

host/bin/bilisimlife.dll

iletisim@bilisimlife.net




 
Rserit
Developer
       
 1026  
 278

Access DataDirectory Değişkeni Oluşturmak

Selamlar,
Access ile çalışırken connection string'te DataDirectory şeklinde bir kısaltma görülür. Bu klasör yolunu yazmamak için string içine yazılan bir değişkendir.

Şöyle oluşturulur:


  string executable = System.Reflection.Assembly.GetExecutingAssembly().Location;         
string
path = (System.IO.Path.GetDirectoryName(executable));
AppDomain.CurrentDomain.SetData("DataDirectory", path);



Şöyle de kullanılır:


 "Data Source=|DataDirectory|Database.mdf";







Mesaj 08.08.2016 09:12:51 tarihinde Rserit taraf?ndan d?zenlenmi?tir.

Developer.