|
I don't know what your table column names for the date are? are you sure its Data and not Date?
|
|
|
|
|
|
The other thing I noticed is the source table name has changed from tblSupply in your original question to salesDetails above, are you working with the correct source, your query syntax format is basically correct.
|
|
|
|
|
is tblSupply.this is not the problem...
when i click the dtpicker 1
nothing displays in listview
|
|
|
|
|
Well i don't know where your running code from, are you looking at the change events for the data picker, which should then fire off a query update using the info.
I get hte feeling you are just copy and pasting code without really thinking about what you are trying to achieve. As a result you are getting yourself tied up in knots and confusing the hell out of yourself and me!
|
|
|
|
|
Hello guys,
it seems to be a simple question - but I've been struggling with it so many times and don't find an elegant solution... I want to fill several lists (of FileInfo) once the path in the relevant textboxes has been changed.
I don't want to connect the list generation / update with the 'TextChanged' event of the textbox, since each of the resulting lists consists of a large number of files (approx. 30.000). In that case the lists would be generated / updated with every new key the user enters when typing the path - resulting in a huge loss of performance, I guess.
I can't use the 'Leave' event either, since this would require the user to enter (each of) the textbox(es) to generate / update the lists.
What would be best practice for that everyday 'problem'? As an intermediate solution I use the 'textChanged' event and check first, if the path exists at all.
Thank you for some hints,
Mick
|
|
|
|
|
When dealing with such large results sets where continuous updating isn't responsive, you could;
a) Use a simple submit/go button approach, so only when the user is ready, they initiate the check
b) Run a background worker process, and abort it if a new change event occurs and restart with the new information
I would personally go with option a.
|
|
|
|
|
Thanks for the idea, Dave. Of course, option a is easier - still I like option b better . Actually I want to collect the files automatically while the user sets other options for their processing.
By now, I anyway use the ThreadPool to collect the filelist, but I didn't think about interrupting and re-starting the process.
|
|
|
|
|
|
Sounds like a very good idea - thank you!
|
|
|
|
|
I am wondering to make a parental control like program for Internet Explorer / Mozilla .. Thanks for the reply and help...
|
|
|
|
|
Firstly, there are plenty around already, so why reinvent the wheel... and secondly - why use VB6 for this?
|
|
|
|
|
_Damian S_ wrote: why use VB6 for this anything?
FTFY
|
|
|
|
|
I'm making a security project, but this is the last problem, making a parental control..
|
|
|
|
|
it is unwise to use VB6 for anything, the language is antiquated and obsolete.
|
|
|
|
|
We have just converted a large VB6 desktop app to VB.NET 2008. First via the VB 2005 (opened the project), then days of fixing errors, etc. Then opened the VB 2005 in VB 2008 so now it is a 2008 solution.
There are about 30 forms with code behind and about 40 other modules.
Message InvalidOperationException was unhandled.
... The type initializer for .... threw an error.
on
AppTest = true
App framework is enabled, it is using .net 3.5.
In a module there is
Public FormMain as frmMain = frmMain
Public AppTest as boolean = false
Public AppTest as boolean = false never gets executed but the FormMain does (as per a breakpoint).
AppTest = true in frmMain crashes with the indicated error.
This works in 6-7 other programs and has for years but crashes with indicated error
There are no errors when we do a build.
need just 1 with FormMain as a reference to frmMain.
This technique worked in many other programs but not this one. Not sure why.
|
|
|
|
|
Usually indicates that an exception occured in a constructor, this case, prolly frmMain. Doing a build only checks for compile-time errors, not for runtime errors.
QBTeKcom wrote: This technique worked in many other programs but not this one. Not sure why.
Make a list of all instructions that throw exceptions in your constructor of the mainform. You can look-em up on MSDN.
Find out
Bastard Programmer from Hell
|
|
|
|
|
Hi,
1.
Public FormMain as frmMain = frmMain is a statement I don't understand; how could one initialize a variable of some type to its type? or is there some VB idiosyncrasy I'm missing?
2.
I suggest you put a breakpoint near the start of the frmMain constructor, then single-step from there.
|
|
|
|
|
VB creates a default-instance of the form. "frmMain.Show" refers to that default instance, and will, sadly, work without creating it.
Bastard Programmer from Hell
|
|
|
|
|
Public FormMain as frmMain = frmMain
At the point this is called, is frmMain already instantiated elsewhere?
If not you will need to Public FormMain as frmMain = New frmMain
|
|
|
|
|
We have not added any code to instantiate it.
In a working program that uses the same technique.
I hit F8 to step thru.
1. It goes into some CheckChanged events on frmMain so I assume the form is instantiated.
2. It then goes into the module with Public FormMain as frmMain = frmMain where it completes the definitions ok (does the last).
3. Then it goes to frmMain's MyBase.load
4. Program runs fine
In the failing program I hit F8
1. It immediately goes to the module with Public FormMain as frmMain = frmMain
(frmMain probably NOT instantiated)
2. The module definitions do not complete (last statement executed is the FormMain).
3. It goes to other modules for defintitions
4. It now goes to the ..Changed events on frmMain (on working programs this was first).
5. It then goes to the frmMain MyBase.load
So the failing program is taking a different startup path and I do not know why.
What would cause the modules to be executed first before frmMain is instantiated?????
|
|
|
|
|
In the project properties, what is the startup form/module?
|
|
|
|
|
frmMain is the startup form on all projects include the failing one and the working ones.
|
|
|
|
|
QBTeKcom wrote: It goes into some CheckChanged events on frmMain so I assume the form is instantiated.
Wrong assumption; might fire from the constructor if it has been hooked up in the InitializeComponent -method.
Bastard Programmer from Hell
|
|
|
|
|
OK, then please tell me how I can make it work like the other programs. What do I need to change or look at or something??????
|
|
|
|