Hey I got it
To find the source path of my database files just i have used a small trick
here first i srored the path to my database files in a string variable it contains all path except the drive name because we can't say in clint sys what is drive name of cd drive so i get this drive from source path
To find the source path of my database files just i have used a small trick
here first i srored the path to my database files in a string variable it contains all path except the drive name because we can't say in clint sys what is drive name of cd drive so i get this drive from source path
Code:
private string GetConfigFilePath(string fpath)
{
string filePath = "";
string dd = "";
string Resources=@"\application\databasefolder\";
dd=sourcePath.Substring(0, 3);
string strConfigLoc = dd + Resources
string strTemp = System.IO.Path.GetDirectoryName(strConfigLoc).ToString();
filePath = strTemp+@"\";
EventLog.WriteEntry("filepath", filePath , EventLogEntryType.SuccessAudit);
return filePath;
}
Comment