The way it worked in the old app was they were copying the selected node and pasting using the clipboard. This copies the selected node and all of its child nodes. (they were using the sendKeys CTRL+C and CTRL+V).
The few examples I have found on the net were just the simple copy and paste of the selectedNode.
I have also tried cloning but have not gotten that to work either.
If you have an example or a link to a good example I would be most greatful.
It seems like it should be a simple task but I guess if it was there would be some meaningful examples.
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
Luc Pattyn [Forum Guidelines][My Articles] The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
You can have several connection strings in the same config file. You can design your application in such a way that it prompts the user to select which environment it wants to connect to and then fetch the appropriate connection string from the config file.
Assume you booked a Air Ticket for California. Now you have changed your mind and decided to go to Paris. What do you think, the same ticket will work? Sorry, just kidding. If you are changing the database, the connectionstring also needs to be changed either in config file or in every places where it is used.
The reason that you didn't get any other good answers is because you question was very unclear and difficult to understand.
I'm not talking about the quality of your English (that's fine), but about how well you describe your problem. Next time you post a question, take the time to properly describe the situation you are in, the problem you are having, and what you are trying to achieve.
My problem is when i am switching to another SQL SERVER with my project then every time i have to change my connection string.
That will always be the case.
The only solution, that I can think of, there may be others but they escape me for now.
1. Try connecting using your stored connectionstring, catch exceptions and when the exception shows database absent
2a. Create a clone of the MS Server Connection Dialog and let the user 'find' the right server. OR
2b. Iterate over all available servers and do 1. above uon each one ntil you find the database, then modify the current connectionstring to match.
You might find it useful to read up on the ConnectionStringBuilder class for a fairly easy way to modify connection strings.
You might also want to download the SQLServer 2008/2005 Samples from Microsoft Download site for an example of cloning the dialog. If you do so an example will be found at YourDrive:\YourBaseDirectory\Samples\Engine\Programmability\SMO\ServerConnect\CS\ServerConnect.
In the Samples directory tree you will also find examples of how to find all available servers, so you can iterate over them, if you decide to do it that way.
Of course whichever way you do it, you will be faced with the problem of how and where to store the modified connection string.
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
During adding records into datagridview i want to prevent duplicate values adding,i am saving multiple values at a time.when i enter duplicate value into specific column then it must show msg for same.
now i am using cell changed event.
Can any body let me know how to create connectivity between two/three systems actualy we developed dotnet application and database is sql server 2000 if try to connect its displaying following Error.
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)"