On 3 Cze, 22:54, weird0 <amiredi...@gmail.comwrote:
On Jun 2, 7:31 pm, Hakan Fatih YILDIRIM <hfysilis...@gmail.comwrote:
or you can add Network=DBMSSOCN to your connectionstring
You mean this is what my connectionstring should be:
public static string connectionString =
@"Network=UIC;server=amirdiwan;database=|DataDirec tory|
\BankingDb.mdf;";
If the code does not know where exactly the db lies, how will fetch
it? Is there some built-in fetching inside the compiler?
Please explain in detail....
Thankyou
As far as I know Not in a compiler but it is build in system
(windows). I have other problem I am usling SMO library
and try to enumerate sql server services in loop find my
instance MYCOMP\FOTOPROG using such code
ManagedComputer mc = new ManagedComputer(sServerName);
string sMessage = "";
foreach (Service svce in mc.Services)
{
sMessage += String.Format("{0} -- {1} -- {2} -- {3} --
{4}\n",
svce.DisplayName, svce.Name, svce.ServiceAccount,
svce.ServiceState, svce.StartMode);
}
System.Windows.Forms.MessageBox.Show(sMessage, " " + mc.Name);
but it only get in mc.Services and shows to me two services
MSSQL$SQLEXPRESS (login type .\tomaszk ) and SqlBrowser (login type
NT AUTHORITY\NetworkService) but no my instance which is MSSQL
$FOTOPROG
and is on a service list and is started (login by .\tomaszk and also
with local
system acount
And I do not know why it does not work and tryin to investigate it and
lern
about this all acounts and privileges and also SMO and WMI for rev
about five
days
TIA
KENOBI