Thanks for your reply. Actually I am using same instance of sqlconnection all over my code because, when I used different instance of sqlconnection, I face another problem. If One connection made a change in the database, another connection doesn't reflect the change. It still retrieive old values from SQL unless that connection itself did not do the changes in SQL. Is there any way to synchronize all changes made by different sql connection instances ?
Hello eyad al akhras ,
Thanks a lot for the reply.
Actually in one of my thread, I have a dataGrid bounded with a daasource, so, my application is considering that databounded datagrid as an open active datareader. And at the same time another thread is executing SQL command. And sometimes, When another thread is executing SQL command, when I try to click Update (or SAve) button of a databinding navigator (for my datagridview) I get the same error saying "already datareader open.". Is there any snippet available to solve this problem either using mutext or something else. I have never used lock, mutex etc in my code, I dont know how to use those.
I am trying to implement a CSR(Coalition Service Registry). This is basically a registry where any service provider registers his/her service. Any service requesting user (initiator) contacts the CSR and the CSR forwards the request to the appropriate service provider and gets the result from it and forwards the result back to the initiator. I am implementing this in Visual Studio .NET C# language.
Generally in .NET to consume a web service we need to add a web reference to the client application. This leads us to use a static URL. But my implementation cannot afford doing this. So how would I approach it? To be more specific I need to implement the same functionality what "Add a Web reference" would do in .NET framework. Another issue I have is the invoking of the web service by the CSR should be transparent to the intitiator. Can anyone suggest a possible solution to this?Suggestions with a little detail of any libraries or classes existing in .NET which I could make use of is highly appreciated.
I'm beginner in these web services so my question may be very silly too sometime. Yeah I came across that option of changing the URL dynamically. But in that case if I'm right the service directory and service file should it be same? A sample code would help me a lot. And after this how will my CSR invoke the service and get the result and give it back to the requested client? I'm kinda confused in this part too.
Yeah I came across that option of changing the URL dynamically. But in that case if I'm right the service directory and service file should it be same? A sample code would help me a lot.
I did this a back while, but unfortunately the code was for an application built for another company, so I can't share any of that code.
The principle however, is simply to create the object for the proxy and then change the property for the URL. I don't remember the details, but I was able to find it quite easily, and you even know what to look for.
DotNet novice wrote:
And after this how will my CSR invoke the service and get the result and give it back to the requested client?
Once you changed the URL you use the proxy as normal. To get the result back to the client you just return it as usual (whether it's a web service or a web request).
I have a "test.cmh" help file that I compiled. Is there a way to restrict the use of the help file to be used only via an C# applications?. in other words, the CHM file will not run when user click on it.
Simply: No I don't think so unless you want to embed the help file as a resource and then extract it when you need but I'm not sure that this will work.
Another simple protection method would be to give it a different name without the .chm extension, for general users they wouldn't change the extension, but then again they probably wouldn't look for it.
Hey Guys, the windows application I use is in Persian, so when I enter to my form I gotta press SHIFT+ALT to change the language to persian from english, I'm looking for a code that does this for me !!! for example whe i load my form it authomatically chnages the language to persian and vise versa.
I was working on a project for a client who runs a scheduled backup daily. He needs to stop the SQL service, which I have done successfully, but I need to find a way to access a tape drive to see that the tape is actually inserted. I do not know of any way to do this with ntbackup.
I have tried to find this on the web but came up fruitless.
This is a windows form in C#, using .NET Framework 2.0.
The tape drive does not come up in the DriveInfo.GetDrives().
Does anybody know how I can verify that the tape is inserted in C#
for (int i = pbStatus.Minimum; i <= pbStatus.Maximum; i++)
// HERE THE PROGRESSBAR DOESNT MOVE
foreach (FileInfo f in files)
ftp.Upload(txtLoggedInSource.Text + "\\" + f.Name);
label1.Text = "All files are upload successfully";
Can someone please help me why it doesn't work with upload