|
The swap can be a problem. Try disabling virtual memory to see if this behavior changes.
The connection to the database being lost could also be a problem. You may want to execute some "keep-alive" command from 30 to 30 seconds to see if this stops happening.
Also, the HD being power off can be a problem. But, have you noticed this in other applications running in that computer?
|
|
|
|
|
Thanks for the suggestions. The client computers usually only run my application so I can't say if other applications face the same problem.
Excuse my ignorance, but do you have an example of a keep alive command ?
Thanks for your time.
Rob
|
|
|
|
|
PosiRob wrote: do you have an example of a keep alive command ?
Yes: SELECT 1
I think what he means by a "keep-alive command" is simply *any* command executed for the purpose of keeping the connection alive, not a special command.
Be aware that if you are using connection pooling, calling Close() does not actually close the connection to the database (it simply returns the connection to the pool). A whole minute to re-establish the connection sounds like a lot, but then I don't know anything about your environment or how you connect to the database.
|
|
|
|
|
Exactly. The keep alive command is only a command to be executed, that will not cause any data changes and is fast. It will only force the connection to be used.
|
|
|
|
|
Hi,
Is there any way to show "Press any key to Continue" message end of the run VS Console application.
|
|
|
|
|
yakupc wrote: Is there any way to show "Press any key to Continue" message end of the run VS Console application
Within Visual Studio if you start debugging with Ctrl-F5 it will do it automatically.
When you run your program outside this environment you will need to code it yourself (Console.Write and Read ).
|
|
|
|
|
By default, "Ctrl+F5" is mapped to "Start Without Debugging"
|
|
|
|
|
worked.It is great.Thank you so much.
|
|
|
|
|
Console.WriteLine("Press any key to Continue");
Console.ReadKey();
the second statement is optional.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
And a less user-friendly variant:
while (true)
{
Console.WriteLine("Continue to press any key.");
Console.ReadKey();
}
|
|
|
|
|
Alternate implementation. I actually think the other solution is better, but I was curious if this would work (and it does). Note that UseShellExecute is important, otherwise the process is opened in a new window. The disadvantage is that you're more tightly coupled with the OS (i.e. it wouldn't work under Mono on a non MS-platform)
using System.Diagnostics;
ProcessStartInfo psi = new ProcessStartInfo("cmd", "/c pause");
psi.UseShellExecute = false;
Process.Start(psi).WaitForExit();
|
|
|
|
|
Or run it from a BAT file.
myapp.exe
pause
|
|
|
|
|
@echo off
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
I didn't want to confuse the reader with such details.
|
|
|
|
|
Hi All, I am facing a problem when I try to insert into sqlite database.
sql_cmd.CommandText = "INSERT INTO test('name')VALUES ('Value2')";
it is giving me error saying test table does not exist but in reality it does.
can you please tell me what I am doing wrong.
thanks in advance.
|
|
|
|
|
Have you asked or looked here[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:25am.
|
|
|
|
|
Hi stancrm, I did try it but did not work. I try also other suggestion too. Nothing is working.
Thanks for you help. if you know anything else I will give a try.
thanks
|
|
|
|
|
Hi All,
Try to run this command in sql server u will come to know what is the problem.
Thanks,
Amit Patel
|
|
|
|
|
I believe that column-names aren't enclosed in quotes;
sql_cmd.CommandText = "INSERT INTO test (name) VALUES ('Value2')";
I are Troll
|
|
|
|
|
Hi all!
I'm trying to get the use ratio of the network , just like the network used(eg. 0.01%) in the task manager.
I tried to realize that through using ManagementClass,but failed.Would you like to show me how to realize that?
Thank you!
--------------------------------------
ManagementClass mc = new ManagementClass("Win32_NetworkAdapter");
ManagementObjectCollection moc = mc.GetInstances();
foreach (ManagementObject mo in moc)
{
string a = mo["Speed"].ToString();//mo["Speed"] is NULL
Console.WriteLine(a);
}
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:25am.
|
|
|
|
|
That's just what I want.Thank you very much!
|
|
|
|
|
Hi,
I want to configure the DHCP server programmatically tjrough C#,
I am able to create the subnet , get the lease infomation from DHCP server etc.
Now I need to set the Options for DHCP server programatically.
I tried to but not getting how can I add DNS server option on subnet through code.
Regards
"A winner is not one who never fails...but the one who never quits"
|
|
|
|
|
Hi All,
I am implementing CD burning in my application. I am able to burn CD but for showing progress % i m using Back Ground Worker.
2 events of back ground worker Do work and Runworkercompleted is getting called but
backgroundBurnWorker_ProgressChanged is not getting called.
Thanks and Regards,
Amit Patel
|
|
|
|