|
They are all about the same when using smaller data sets. The only time you will notice differences in speed between the iterators is when you use large data sets. By large data sets I mean in the 100,000 plus data records range. But there are other factors involved here as well such as the operations being done between the iterations.
For best optimization look at the operations being done between the iterations and I'm guessing you will gain more speed over changing your iterator.
Phil
|
|
|
|
|
|
How can I detect whether a certain field retrieved from the database contains an image or other type of blob?
I have a MSAccess table with an OLE-Object field holding a bitmap. This field is added to the DataTable as an System.Byte[] type. How do I know whether this field actually holds an bitmap?
Thanks for any help you can give.
Regards,
Kees Vermeulen
|
|
|
|
|
The only way you can get this info is by inspecting the data in the field. You can either extract it and try to load it into an image or you can read the header bytes to see if they conform to known types.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
I am using .NET 3.9 in VS 2005. If I double-click on control to create a click event, nothing happens. There is also no event tab in the properties window.
Does anyone have an idea on what could cause this / what the cure is ?
Johan Lombaard
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former - Albert Einstein
|
|
|
|
|
Oops, .NET 3.0
Johan Lombaard
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former - Albert Einstein
|
|
|
|
|
You need to define the event with the associated event handler in XAML markup. VS 2005 (with WPF) wont automatically create an default event handler when you double click a control.
|
|
|
|
|
I have .NET 3.0 installed. I've not noticed any side-effects.
Kevin
|
|
|
|
|
I have an class library which uses Micrisoft Office Excel Object library for creating Excel objects. I want to include these dll's as a part of my class library dll. I tried using ILMerge utility, but could not merge these assemblies. Since Micrisoft.Office.Interop.Excel is a COM object I tried converting it into .Net assembly by using tlbImp. But am not able to do it. Please help in including it with my dll.
|
|
|
|
|
You can't. The client has to have Office installed in order to use this.
tlbImp doesn't convert anything to a .NET assembly. It creates a Runtime Callable Wrapper assembly that has to be used ALONG WITH the COM component. It will NOT replace the COM component.
|
|
|
|
|
Thanks a lot for the reply. I can understand that the client needs to have Excel installed on its machine. But I wish to use my library as a component so that the client may just add a reference to my dll and then call the required functions. For this to happen in current scenario the client will have to have the excel object library too in the bin folder.
|
|
|
|
|
jain.ashish21 wrote: For this to happen in current scenario the client will have to have the excel object library too in the bin folder.
Is that such a big deal?
|
|
|
|
|
Dear sirs:
I wrote program that performs one resource-intensive operation. This operation is to convert PDF into a text file. I decided to spin-off this single operation on a threading delegate as shown below:
Class Pdf()
{
public delegate string PdfIsbn();
string ISearch.Isbn( string sFileName )
{
m_sFileName = sFileName;
PdfIsbn pdfIsbn = new PdfIsbn( GetIsbn );
IAsyncResult iasResult = pdfIsbn.BeginInvoke( new AsyncCallback( IsbnComplete ) , "Isbn is complete" );
/**********************************
******** Regular Processing *******
**********************************/
// It only works if this code is un-commented.
while (!iasResult.IsCompleted)
{
Console.WriteLine("Please wait...");
//return m_sIsbn;
}
return m_sIsbn;
}
private void IsbnComplete( IAsyncResult iasResult )
{
AsyncResult ar = ( AsyncResult )iasResult;
PdfIsbn pdfIsbn = ( PdfIsbn )ar.AsyncDelegate;
m_sIsbn = pdfIsbn.EndInvoke( iasResult );
Constant.g_iThreadCount -= 1;
}
string GetIsbn()
{
Constant.g_iThreadCount += 1; // Increment thread-counter.
Console.WriteLine( "Pdf version of search implemented" );
Thread.Sleep(5000);
dtSearch dtSrch = new dtSearch( m_sFileName ); // Pass-in filename only.
regEx = new RegEx( "Isbn" ); // Search for a regular expression that fits the "ISBN"-type.
SearchIsbn( regEx , dtSrch.ResultText );
return m_sIsbn = regEx.RegExResult; // Get the ISBN.
}
}
The Main program is a windows form with a DataGridView. The main loop cycles through subfolders; each one containing a PDF.
do
{
try
{
file.GetDirectory(); // gets a book inside a directory, performs search etc.
// If a valid ISBN is found it will show up here.
if (file.SearchItem != "")
{
newBooks.AddBook(new Book(true, file.FileName, file.SearchItem));
}
}
catch (Exception ex)
{
file.LogError(ex, ex.Message.ToString());
}
} while ( file.SubFolder != "sub-folder iteration completed." ) ;
bindingSourceEbookCollection.DataSource = newBooks;
dataGridViewEbookCollection.DataSource = bindingSourceEbookCollection;
dataGridViewEbookCollection.AutoGenerateColumns = true;
I have tried to make the grid "aware" of all of the new book-entries being made inside the collection to which it is bound; to no avail.
I tried using a global "Thread Counter" so that the loop would keep executing until all the threads have been processed; and putting the "grid-binding" code inside the loop with the intent being that it would be "refreshed" with the new book-data.
The way the code is written now, the books show up but only after they have ALL been processed and the grid is blank until the whole process (all books) is completed.
The idea behind "encapsulating" the single, resource-intensive process inside a thread was to show the status of "processing... " inside the data grid for each book that was spun-off on a thread.
Any help is appreciated.
Many thanks,
R. Hyland
|
|
|
|
|
Maybe I am missing something here, but it seems like you should be updating your grid when the async event comes back:
private void IsbnComplete( IAsyncResult iasResult )
{
Then you need to do something like Application.DoEvents for your grid to repaint.
Hope that helps.
Ben
|
|
|
|
|
Thanks, I finally got it to work per your advice.
-- modified at 15:19 Thursday 24th May, 2007
|
|
|
|
|
I have old code written at VS 2003 which uses VS6/MFC.
When I try to run it at .Net 2.0 frame work, I got error ( I think a tone of MFC dll ).
Do you konw any links to solve it?
thanks!
|
|
|
|
|
Reli A. wrote: I have old code written at VS 2003 which uses VS6/MFC.
OK, so which is it, MFC7.1, or MFC6 ?
Reli A. wrote: When I try to run it at .Net 2.0 frame work, I got error ( I think a tone of MFC dll ).
You mean it blows up when it runs, or when it compiles ? If it builds in VS2005, it will link to the VS2005 dlls, I'd have thought. What errors are you getting ?
This question has nothing to do with the .NET framework, if you're talking about a C++/MFC app, so I'd ask it in the C++ forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hellow to all
i am installing an app that i had wrote in win98 , that have all the framework updates ..
and every time i run the program i get this error
Application has generated an exception that could not be handled
process id=0xfff87f77 (-491657) , thread id=0xfff96927 (-431833)
|
|
|
|
|
So what did you do in your application that Windows 98 doesn't support? Did you EnableVisualStyles maybe? Or something else?
|
|
|
|
|
|
Hello!
Tell me please, how can I load pictures into WebBrowser control from the resources?
|
|
|
|
|
you can't directly - your web browser can only read HTML, with img tags which point to images on your hard drive, or on the network/internet.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Am I correct in assuming that if I have VS.NET 2005 installed and then put on the latest 3.0framework that I can still do projects that are NOT dependent on the V3.0 framework? I don't want to have to convert all my 2.0 projects over and I am not all that ready to start playing with all the cool V3.0 stuff just yet, I only want to start playing with the SCSF and the last build seems to require the update framework.
|
|
|
|
|
yes.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|