I have removed the trusted connection but can not still retrieve from the database. All I want is onformLoad it should get the record from database and display it in textbox.
Expecting your reply
When I am working with a datareader, I always try and make sure that I actually received a datareader back from the ExecuteReader() call (ie "if(myReader != null)". I also check the HasRows property on the datareader object to verify that I have results to loop through. The way this is coded now, the while loop will read each record from the datareader. If data from the first row is all that is needed, calling myReader.Read() by itself will just read the first row (instead of using the while loop).
Find a penny, pick it up, and all day long you'll have a back-ache...
you can find out what screen you are using (when on a multi-monitor setup), get its resolution, then position the form appropriately. You would need the Screen class (maybe GetWorkingArea() method), and set the Form's StartPosition and Location properties.
BTW: you may have to take the selectable behavior of the task bar into account.
PS: for other apps, you would need to send Window messages and/or call Win32 API functions.
Luc Pattyn [Forum Guidelines][My Articles] DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
I want to use the errorprovider control with checkboxes I have on a form.
I know with a textbox:
you can use something like if (textbox.text = <=0)
errorprovider.seterror(textbox,"you must enter data");
but with a checkbox am unsure of how to use
If the author of the tool you have downloaded doesn't make the source available, my guess is that they don't want you to have it.
You shouldn't really ask people who write code for a living to help you steal it.
If you are unable to copy the GUI and unable to put the code together by using reflector, I doubt very much if you have the ability to code such an application, even if someone told you how to do the GUI.
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.”
mind ur language. my motive was to understand how things like reflector work. if u don't have the answer at least don't speak nonsense and discourage people. exe are meant to hide code. and reflector to experiment with the same. ur answer shows ur incapability to understand the problem n solve the same. stop doubting others capabilities when u urself don't know.
others pls ignore this reply n help if they can.
I won't ignore that reply, it was extremely rude and disgusting at best, and uneducated and reflected your level of knowledge at the least.
Mind your language, and do conduct yourself accordingly. You are the one asking for help from us after all. If you don't like an answer from someone, ignore it. Don't insult. And by the by, you'd be lucky to get an answer form Henry Minute again, he's extremely helpful around these boards, try to show him the utmost respect.
You really know how to make friends and get support. Here are the list of some things you did wrong:
Asked how to steal code in a software developer forum - don't give me crap about "learning"
Insulted someone who gave you an answer when it was not helpful (but was polite)
Tried lying to explain your motives which if true prove you are a fool.
Used text speak - this is not recommended. You have a keyboard try and use it.
Never underestimate the power of human stupidity
I have two methods in a windows application(am converting to a winservice). I need these methods to run after specific intervals with out user intervention. I have googled a bit and realize that i have 2 main options (correct me if i am wrong).
2. Timer (using TimerCallback)
I have ruled out threading because i want only one thread of execution. I want one of the method to execute at a time.
Timer would execute a method at intervals but my problem is that i want to run 2nd method every 1.5 hour where as the 1st method every 3 hrs. In cases where there is kind a collision method 1 should run first and then method 2. plz note first 90 mins , method 2 runs, 2nd 90 mins both should run but i want method 1 to run and then method 2 can run.
how do i solve such problem. Please provide a solution. Code snippet or idea or web url will highly be appreciated.
I don't believe you can or want to depend on any timer based mechanism to guarantee the order of two notifications. You need to account for that yourself.
Your posted requirements are not specific enough to determine this but perhaps you can have a single timer that fires every 1.5 hours since 1.5 + 1.5 = 3 hours. Therefore every other time it fires you just run both methods in the proper sequence. This could easily be accomplished using a finite state machine design.
Last Visit: 31-Dec-99 19:00 Last Update: 5-Mar-21 17:04