|
That's right. So I do not use "using" if I want to return the datareader.
But "CommandBehavior.CloseConnection" is a remedy for this.
OleDbDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
Once you close datareader, the connection will be closed too. You can see this result in step debugging.
|
|
|
|
|
I use Speech component and when speaker is reading, the other commands not work, how can i enable pause and stop during speaking?
thanks everybody for the answers
|
|
|
|
|
Use the Speak command in a background worker so that nothing else is defunct till the speech is over.
|
|
|
|
|
so what shall i do?
use threads?
at micro programing it was so easy, just check a
flag or bit for an event each certain time.
but i can not found any thing in c#!
|
|
|
|
|
BackgroundWorker Component
Do you know about them?
What u hav 2 do is
Write the code to be executed in their DoWork event.
Then the play button should have code like BackgroundWorker1.RunWorkerAsync()
Read about BackgroundWorker. That is a simple and effective solution
|
|
|
|
|
hi
I want to insert the HTML tag in a page for c# ASP.net
thanks
|
|
|
|
|
|
What is your question?
It's time for a new signature.
|
|
|
|
|
I want to insert the HTML tag in a page for c# ASP.net
|
|
|
|
|
that still isn't a question. What is your question?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
genieabdo wrote: I want to insert the HTML tag in a page for c# ASP.net
OK, go ahead and do it, you don't need permission from us.
It's time for a new signature.
|
|
|
|
|
That's a statement. At best, it's your requirement. As you are looking at an ASP.NET page, you can add pretty much any HTML tag you like.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
No question!
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Be specific with your question. What tag do you want to add? Where do you want to add it? More importantly, what's your problem in doing that.
|
|
|
|
|
I need some help on a windows forms project.
Basically I would like to render images to a certain portion of the windows forms, but when i press the arrow keys I would like it to scroll the images in the rendering area as if it were a 2D camera of some sort.
The problem is I dont know what control to use that can assist me in doing this?.
Does anyone have any ideas?
|
|
|
|
|
I figured out that I can draw using GDI + to the "Panel" control
|
|
|
|
|
Hi, All!
How can I verify if selected file is DOS, 16/32/64-bit executable?
Thank a lot!
|
|
|
|
|
Are you talking about your executable? If you are, it can't be 16 bit - there is no 16 bit .NET environment.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
No, external file. Any *.EXE that I choose on my HDD.
|
|
|
|
|
ds41 wrote: Any *.EXE that I choose on my HDD
There's multiple sorts of executable[^] formats. A 16bits DOS executable might start with the ASCII signature "MZ", but it's not guaranteed to be an executable. Might also just be a textfile that's renamed to "exe"
I are Troll
|
|
|
|
|
See this[^] post. Should help.
|
|
|
|
|
Because of your reply to POH I assume that you want to determine the "kind" of exe file something is.
It's simple really. Parse the headers a bit (skip the MZ header)
If there is NE, it's a 16bit windows (or DOS 4) executable.
If there is PE, it's a 32 or 64 bit executable, parse the PE header to determine which.
Otherwise, it's a simple MZ (DOS) executable.
|
|
|
|
|
Nice tip! But as I see I should get SubSystem too (cui/gui). It is stored in the PE header right? Do you have any information about offsets which I should use?
|
|
|
|
|
There is no fixed offset from the beginning of the file, so I will explain how to get to the correct location.
First read DWORD at offset 0x3C from the beginning of the file (it's in the DOS header, a field called e_lfanew)
Move to the offset specified by e_lfanew (this is the place where you will find NE or PE, or something else if it's a DOS executable (or in that case this value may be invalid, I'm not really sure - it's been a while since I saw a real DOS executable))
Move 92 bytes further and read a WORD, this is the subsystem.
modified on Monday, June 7, 2010 11:42 AM
|
|
|
|
|
hi all
i am using vs.net 2005 to change the excel's cell word partially e.g
abc <==where by only the a is red
is this possible
so far i am able to change the whole cell color with this
Excel.Range rng2 = oSheet.get_Range("A1", Missing.Value);
rng2.Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red);
can anyone advice please
|
|
|
|