|
semiramisContraA,
You've already asked that question Here[^]
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
I know but unfortunately I didn't get any useful answers!
|
|
|
|
|
Do you want to break the loop if the total time is longer than 2000 seconds, or do you want each Hello call to time out after 10 seconds? Can your code handle some Hello calls running concurrently?
Semicolons: The number one seller of ostomy bags world wide. - dan neely
|
|
|
|
|
If you posted it somewhere already and you didn't get any un-useful answers, and you repost on the same site that exact same question then you will get the same un-useful answers and aggrivated codeprojectians as well.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
I Think you are wrong, the second time I posted the message, I got the answer, I was looking for.
In this site as the posting load is very high, your post gets buried under other ones very soon, so many people who may know the answer do not get the chance to read it, by reposting a request you double the chance.
|
|
|
|
|
Start the method in it's own thread, then if it doesn't respond for a while you could end it.
I'm not sure why you'd want to do this though, what would cause the method not to respond?
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Thank you for your response, I've tried multi threading, but as I do not want to use of static functions, it doesn't work.
I'm writing a code which is about to measure the vulnerability of a web service facing dos(denial of service) attacks. So I'm calling a method of a specific service 500 times to see if it is able to handle the requests. So you see that I should be able to abort the calls if the service, fails to answer.
|
|
|
|
|
have a look at the backgroundworker class.
|
|
|
|
|
I'm getting an InvalidOperationException with the following message:
"Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function."
Essentially, the context is this:
Initially, I do something like this:
BindingSource bds = new BindingSource(dataSet1, dataTableString1);
dataGridView1.DataSource = bds;
But, say I perform an operation on the datagrid which makes me want to reload the entire datagrid. What I do is something like this:
dataGridView1.DataSource = null;
dataGridView1.DataBindings.Clear();
dataSet1.Clear();
sqlDataAdapter1.Fill(dataSet1);
BindingSource bds = new BindingSource(dataSet1, dataTableString1);
dataGridView1.DataSource = bds;
The exception is thrown on the first statement when the data source is set to null. I've looked around and it seems like various situations will cause this issue, but not enough to give me a good idea on how to fix it.
|
|
|
|
|
Cyrilix wrote: dataGridView1.DataSource = bds;
That should be sufficient to replace the datasource.
|
|
|
|
|
I will give that a try.
Thanks.
|
|
|
|
|
You maybe have to 'reset' your bindings on the bindingsource if I remember correctly. But you should never have to clear it AFAIK
|
|
|
|
|
I also encounter the same problem, anyone here have solution for this problem?
|
|
|
|
|
Whoa, this thread is old. Well, I ended up changing a lot of code during all of this, and never really got down to the bottom of the problem, so I scrapped the idea. Essentially, I was trying to change a DataGrid into a DataGridView, although there was probably other existing code and assumptions I wasn't aware of, that caused this problem.
Sorry I couldn't be of more use.
|
|
|
|
|
Hello,
I am writing a simple C# program that will play an AVI file in a Form. I am able to currently do this by specifying the path for the file, and telling my program to open it from there. However, I would like to be able to somehow include this video as a part of the compiled .exe, so that, for example, I could play this video on another computer which doesn't have the video on its hard disk.
I have tried this by going to Properties, then "Add Existing File", and then browsing and finding my video file. This seemed to work fine, until I then tried to build the project, and I got the error:
The "GenerateResource" task failed unexpectedly.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Resources.ResXFileRef.Converter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
at System.Resources.ResXDataNode.GetValue(ITypeResolutionService typeResolver)
at System.Resources.ResXResourceReader.ParseDataNode(XmlTextReader reader, Boolean isMetaData)
at System.Resources.ResXResourceReader.ParseXml(XmlTextReader reader)
at System.Resources.ResXResourceReader.EnsureResData()
at System.Resources.ResXResourceReader.GetEnumerator()
at Microsoft.Build.Tasks.ProcessResourceFiles.ReadResources(IResourceReader reader, String fileName)
at Microsoft.Build.Tasks.ProcessResourceFiles.ReadResources(String filename, Boolean shouldUseSourcePath)
at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, ArrayList inputs, ArrayList outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass)
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) WindowsFormsApplication3
I don't know what this means, but it seems to suggest my video file is too big to be a resource or something. The video file is an uncompressed AVI file, but it is only 250 MB, so surely this can be a part of the executable?
If not, then is there a way that I can keep the video file and the .exe file separate, but allow the .exe file to use the video file? (without specifying the path name.)
Another quick question - I have tried adding a bitmap as a resource, and this has worked fine, but how do I then use this file? For example, if I wanted to display this bitmap as the image in a picture box, how do I reference the bitmap in the resources?
Thank you for any help on this!!
Ed.
|
|
|
|
|
|
Thanks for your help Leppie.
I already added the file as an embedded resource, and it still gave me the error. I am using Windows XP, not Vista...
Is there anyway I can keep the .exe and .avi files separate in that case? But still allow the .exe to use the .avi without knowing the path name?
Thanks,
Ed.
|
|
|
|
|
ejohns85,
Just a thought, but you could include the avi in your deployment package (eg: installer)
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
I'm creating .NET 3.5 WinForms application.
I need to create textbox which remembers last 10 entries (stores in isolated storage) and
offers users to select them on entry just like IE auto-complete address bar.
I think I must use textBox custom AutoCompleteSource.
Any idea or sample how to implement this ?
Andrus
|
|
|
|
|
AndrusM wrote: Any idea or sample how to implement this ?
Search for the articles here on CodeProject, there should be many.
|
|
|
|
|
Thank you.
I made some search but havent found any.
Can you point me to some articles, please.
I need to run this under MONO also, so best is wihtout direct winapi calls.
Andrus
|
|
|
|
|
AndrusM wrote: I made some search but havent found any.
Try harder
|
|
|
|
|
Hi.
I am developing a pocket pc application using c# and VS 2008. I have a web service with some methods to make CRUD
operations and connect the pocket pc application to SQL Server 2005. So far so good.
I need to send the information to connect to the database server from the pocket pc to the web service, you know, the
server name, user id, password and database name. At this point i have a problem. I don't know how to pass that info
from PPC to the web service or i don't know what is the correct way to achieve this.
I have tried this:
public class MyService{
public MyService(string server, string uid, string pwd, string database){
}
}
I have added in the constructor method of the web service some parameters to send the connection information from the
pocket pc to the WS.
But the problem is that i can not send information via parameters to the constructor of the class or WS. I mean, i have this
code in my ppc app:
MyService ws = new MyService("server","sa","123","mydata");
This code does not work 'cause it seems that i can not send information, parameters to the constructor of the web service.
So i would like to know what is the correct way to connect an application to the database making use of web services, or
how to send connection information from any app to the web service to connect to sql server.
One way could be sending this info to any method i have in the web service, but i don't like this way, i think it's not
the right way.
Thanks for your time.
Bye...
Henry de Sousa
|
|
|
|
|
HenrydeSousa,
Use properties.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Hi.
Thanks for your answer.
This is what i'll do. I'll create four static properties in a class and store the server name, user id, password and database name
to the properties form the pocket pc app, then when i need to call a method of the web service to communicate with the database i'll
send these properties as parameters to the methods.
I guess this is what you meant, i tried to create a property in the web service and stablish the value to that property
from the pocket pc app but i can not access any property of the web service, if i am wrong please tell me.
Regards...
Henry de Sousa
|
|
|
|
|