|
I think what you are looking for is "localhost".
If you set the server name in the connection string to "localhost" it will connect to the SQL server running on the local PC.
You need to explain your question in more detail and explain what you are trying to do, your question is not clear at all.
Simon
|
|
|
|
|
Thanx dude!! u only gave my answer.
|
|
|
|
|
My pleasure.
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.
Simon
|
|
|
|
|
KIDYA wrote: 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.
Good Luck!
Henry Minute
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.”
|
|
|
|
|
Hello Experts!!
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.
|
|
|
|
|
Set the constraint on the column in the DB itself.
जय हिंद
|
|
|
|
|
|
can you please provide source code to prevent entering duplicate values in mysql using aspx
|
|
|
|
|
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)"
|
|
|
|
|
Check ur connection string.which authentication u r using for SQL SERVER.if ur using local then just change old connection string with ur workign SQL SERVER.
|
|
|
|
|
KIDYA wrote: Check ur connection string.which authentication u r using for SQL SERVER.
The error message indicates that the issue is with establishing a connection, not with authenticating a connection.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
this site[^] is the haven for connection strings.
Yours needs work.
|
|
|
|
|
I have a file "vnspeech.dll",it have function "int VietUniTTS(wchar_t*)".How use this function with C#?????
Thanks!
|
|
|
|
|
I want IE to navigate through a PDF file which is on desktop when a PDF file's URL is obtained in the addressbar,
object empty = System.Reflection.Missing.Value;
webBrowser.Navigate(DesktopFilePath, ref empty, ref empty, ref empty, ref empty);
if I continuously open some url's like http://somesite.pdf, then the IE continuously navigates through the PDF file which
is on desktop(i.e., c:\currentUser\desktop\123.pdf), after sometime if I try to navigate some other links IE gets hanged,
How can I solve this?
I was doing all this through a BHO, when a DocumentComplete Event is fired using c#.
|
|
|
|
|
We know that so far there are several .net languages included in Visual Studio.
But what are the advantages and disadvantages of these languages, compared to each other?
I have the following personal feelings, but I am not sure whether they are right or not, if not, please correct me:
1) C++, still the most performance efficient, but no more features and no more improvement(?)., especially MFC is just stopped, MFC has no future(?).
2) C#, most standard language in .net framework, most elegant langauges learned from several old languages incuding C, C++ and Java, more and more features and improvements are coming, c# 1.0, 2.0, 3.0, 4.0 ...
3) J#, outdated language, no further progess at all, less and less people use it? it will die or already died?
4) VB.net, traditional MS language, will be (hopefully) co-developed with C#
5) F#, functional language, a new .net language with more functional supports,but many features in C# and F# can be seen from each other, F# can be popular just as C#?
In considering the applications of web appications, C# seems to be most promising language.
therefore, it is necessary to learn C# very well, other languages may be a plus to some extend.
wellcome your comments.
|
|
|
|
|
Yeah, I agree with you in some points. But I think the area of uses for C++ is completely different as compared to C#.net,VB.net,J#.net etc.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
Seraph_summer wrote: We know that so far there are several .net languages included in Visual Studio.
But what are the advantages and disadvantages of these languages, compared to each other?
This almost reads like a homework question.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Seraph_summer wrote: We know that so far there are several .net languages included in Visual Studio.
That, we do. You forgot to mention the languages like IronPython
Seraph_summer wrote: 1) C++, still the most performance efficient, but no more features and no more improvement(?)., especially MFC is just stopped, MFC has no future(?).
There are some slight differences between C++ and C++.NET, and you could call that an improvement. As a sidenote, C++ isn't limited to MFC and definitely has a future.
Seraph_summer wrote: 2) C#, most standard language in .net framework, most elegant langauges learned from several old languages incuding C, C++ and Java, more and more features and improvements are coming, c# 1.0, 2.0, 3.0, 4.0 ...
"Most elegant" is a personal flavor and not relevant in an objective comparison
Seraph_summer wrote: 4) VB.net, traditional MS language, will be (hopefully) co-developed with C#
I think that VB.NET will be merged with C#, sooner or later.
Seraph_summer wrote: 5) F#, functional language, a new .net language with more functional supports,but many features in C# and F# can be seen from each other, F# can be popular just as C#?
Lots of features can be "seen from each other", since the .NET framework is shared across the languages. F# isn't meant as a replacement for C#, and I doubt that many people will try to convert VB6-projects to F#. It is, however, a cool calculus-language.
Seraph_summer wrote: In considering the applications of web appications, C# seems to be most promising language.
therefore, it is necessary to learn C# very well, other languages may be a plus to some extend.
If you only consider webapplications, C# will be a good choice (like PHP). C++ isn't really meant for webapplications, although there's nothing stopping you from mixing languages. You may also want to take a look at some scripting languages, like JavaScript
I are troll
|
|
|
|
|
Hi,
I m quering about how will I get the appropriate row record on clicking respective checkbox on the row of datagridview? Is there any event about databinding events to succeed further? I m using c# windows & I have attached checkbox to each row programmatically.
I want to check it for furher process. Here my data is displaying on textchange event of textbox using LIKE query.
Please help.
|
|
|
|
|
IMO all you need to do is add a unbound DataGridViewCheckBoxColumn to the gridview and handle the CellContentClick event.
जय हिंद
|
|
|
|
|
Thankx dude.
I have done it in a proper way with the help of you.
Thankx again.
Jay Hind.
|
|
|
|
|
Hi Guys,
i have the need to find an application that is similiar to OWA but has an addon,
OWA does not ALERT a new mail when you are not on the web page open, so i thought to code an application that functions as mini Outlook / OWA, but alerts like outlook near the taskbar or any alert on the tray,
how hard could it be to code such a thing in c# or is there anything similiar ?
Thanks
|
|
|
|
|
OWA runs as a webpage, and webpages cannot create tray-icons; they can only display things in the browser that they are displayed in.
I are troll
|
|
|
|
|
That's not what i asked,
you can code a program that listens to the events of the web page like OWA Notifier, i need something like that , i saw it after i posted here but they does not seem the best options
i need to code smt simple that alert new mails in the tray and play sound i choose
|
|
|
|
|
alonchap wrote: like OWA Notifier
OWA Notifier is a desktop-application. You can drop a NotifyIcon [^] on it to display an icon in the tray. The webpage won't raise any events, but you can use a timer [^] to fetch the webpage (with a given interval).
I are troll
|
|
|
|
|