 |
|
 |
if i create change in usercontrol form means add some more textboxes and then rebuild it after that i must have to change the reference file .dll from where i get that .dll file so that i may give referenced of it in project
|
|
|
|
 |
|
 |
If u have added the project of this control to your solution and referenced the project to you application project (the one containnig you main application) then you don't need to update any dll you just rebuild it. Otherwise if you are using both projects in different solutions, you can find it the debug folder of the project containing the control.
Mujtaba
"If both of us are having one apple each and we exchange it, at the end we both will have one apple each. BUT if both of us are having one idea each and we exchange it, at the end both of us will be having two ideas each."
|
|
|
|
 |
|
 |
I am using MS Vista SP1, VS 2008 SP1, SQL Server Express 2008 with SP1, and .NET 3.5 SP1. I run osql /L and I get the result:
C:\>osql /L
Servers:
(local)
BRIANHART-PC
C:\>What I expect is:
C:\>osql /L
Servers:
(local)
SQLEXPRESS
C:\>
Just to be clear, I am looking for the instance not the server's computer name, but all I keep getting are computer names. So I am getting back the name of my computer but not the name of the instance, .\SQLEXPRESS. Has anyone else had this problem? When I open SQL Server Configuration Manager, the SQL Server with the instance SQLEXPRESS is running. Microsoft, in its infinite wisdom, has not yet provided us with a SQL Server Management Studio Express Edition (SSMSEE) 2008 yet, and the SSMSEE 2005 will not work with SQL Server Express 2008.
Anyone else encounter this? Any ideas on what is going on?
Sincerely Yours,
Brian Hart
modified on Sunday, August 17, 2008 1:01 AM
|
|
|
|
 |
|
 |
Use:
net start "SQL Server Browser"
then do:
osql /L
Apparently it is using the Browser service and SQL Server Configuration Manager is using the Registry directly (which the SQL Server Browser is using as well).
|
|
|
|
 |
|
 |
Just figured how to get the local Sql instances from the Registry (e.g. not using the Sql Server Browser).
Perhaps one could use this as a fallback.
RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Microsoft Sql Server");
Console.WriteLine("Key: {0}", key);
string[] instanceNames = (string[])key.GetValue("InstalledInstances");
foreach (string instance in instanceNames)
{
Console.WriteLine("Local Instance: {0}", instance);
}
|
|
|
|
 |
|
 |
I've been looking into detecting SQL Server 7.0, 2000 or MSDE instances without success. Your solution helps, but it only works under this prerequisites:
- SQL Server 2005 or SQL Server 2005 Express Edition (SQL Server Express)
- .NET Framework SDK 2.0 or Microsoft Visual Studio 2005
There is no spoon.
|
|
|
|
 |
|
|
 |
|
 |
Hi,
I have retrieved the server names on a network but not able to retrieve the instance name relevant to that server name.
this line extracting only server name.
comboServers.Items.Add(servers.Rows[i]["ServerName"] + "\\" + servers.Rows[i]["InstanceName"]);
please guide me.
thanx
|
|
|
|
 |
|
 |
Could you please tell me what are your server and instance names?
Somtimes the instance service not properly running cause this problem.
Mujtaba
"If both of us are having one apple each and we exchange it, at the end we both will have one apple each. BUT if both of us are having one idea each and we exchange it, at the end both of us will be having two ideas each."
|
|
|
|
 |
|
 |
There is a limitation to using SqlDataSourceEnumerator class...
if the "SQL Server Browser" service is disabled or not running on the SQL server system, it can't be detected by this method.
|
|
|
|
 |
|
 |
... with servertype = SV_TYPE_SQLSERVER could be an alternative.
Nuclear launch detected
|
|
|
|
 |
|
 |
I had a similar need about two years ago for a product I'm working on (still). I had to be able to get to every SQL Sever that could be found on the network. Everything works great, however, in a peer to peer network (Windows XP), if the PC that happens to host the Browser file is shutdown or otherwise unavailable, nothing can be found.
Did you get around this problem, or have you encountered this?
Michael Jackson
|
|
|
|
 |
|
 |
Well I didn't face this problem and I am getting all the servers on the network and it works fine for all of them. Are you still facing this problem?
Mujtaba
"If both of us are having one apple each and we exchange it, at the end we both will have one apple each. BUT if both of us are having one idea each and we exchange it, at the end both of us will be having two ideas each."
|
|
|
|
 |
|
 |
Mujtaba,
This problem I have is not in your component, it's in my code that I wrote 1.5 years ago. I wanted to find out if you (or anyone using your component) has encountered this problem.
I still get this problem in my code. It eventually clears up when a running pc becomes the computer browser host, but until that time, my client's really complain.
They can still connect to a 'known' server by typing in the server name manually.
|
|
|
|
 |
|
 |
Are you using SqlDataSourceEnumerator that I have used in the component or you are using OLEDB32 API calls for loading the servers?
Mujtaba
"If both of us are having one apple each and we exchange it, at the end we both will have one apple each. BUT if both of us are having one idea each and we exchange it, at the end both of us will be having two ideas each."
|
|
|
|
 |
|
 |
I'm using API calls.
_
Private Shared Function NetServerEnum( _
ByVal servername As String, ByVal level As Integer, ByRef bufptr As IntPtr, ByVal prefmaxlen As Integer, ByRef entriesread As Integer, ByRef totalentries As Integer, ByVal servertype As SV_101_TYPES, _
ByVal domain As String, ByVal resume_handle As Integer) As Integer
End Function
|
|
|
|
 |
|
 |
Well I am sorry I am not sure about it but I think there must some problem with your API calls. I would suggest to use that SqlDataSourceEnumerator.
Mujtaba
"If both of us are having one apple each and we exchange it, at the end we both will have one apple each. BUT if both of us are having one idea each and we exchange it, at the end both of us will be having two ideas each."
|
|
|
|
 |
|
 |
Actually I did try the SQLDataSourcEnumerator at one time, hoping it would solve the problem. It did not. I don't think anything could solve the problem.
The root of the problem, I beleive, is that one of the peer to peer pc's becomes the pc that contains the Computer Browser database. I have no idea how this pc is chosen in the network. When that pc is unavailable, either thru being shutdown or disconnected, no pc on the network can find the Computer Browser database. Eventually (I think about 10 minutes later), another PC will become the host of the Computer Browser database, then all is fine again.
In some networks where I have my software installed, the Computer Browser database never seems to migrate to a new pc. Of course, this only happens on my employers office network.
I just live with it, because I've never found a solution.
Thanks for the help.
Michael
|
|
|
|
 |
|
 |
I want to ask how do you create an .dll and .exe. please help.
by
Mike zuluboy Maseko
"dont try to be someone because everyone is taken"
|
|
|
|
 |
|
 |
In the current solution that I have provided with the article you just have to right click on SQLServerDetectionControl project and select Build (Or Rebuild) and the dll will be created in Debug folder of that project.
To create executable of test application you have to run TestAppForSQLServerControl project. Just right click on it and select
Debug->Start New Instance
OR just open the Form1.cs and press CTRL+F5
If you need more help you can ask.
Mujtaba
"If both of us are having one apple each and we exchange it, at the end we both will have one apple each. BUT if both of us are having one idea each and we exchange it, at the end both of us will be having two ideas each."
|
|
|
|
 |
|
 |
This is a good effort. Keep this control enhancing..
Imran Haider
|
|
|
|
 |
|
 |
This control of yours is very handy saves a lot of time keep up the good work
|
|
|
|
 |
|
 |
This is good work, This would be very handy for installers.
|
|
|
|
 |
|
 |
Thanx 4 the comment
Mujtaba
"If both of us are having one apple each and we exchange it, at the end we both will have one apple each. BUT if both of us are having one idea each and we exchange it, at the end both of us will be having two ideas each."
|
|
|
|
 |