|
One of these days, Tom, I'm going fly over to Belgium and treat you to steak and a case of larger!!
|
|
|
|
|
evilnoodle wrote: One of these days, Tom, I'm going fly over to Belgium and treat you to steak and a case of larger!!
Any time you want I always have time for a good steak and a case of larger
|
|
|
|
|
Hi,
the purpose of an interface *is* to call its members, not just to declare them, so try something like:
Dim _Form as new IDataForm.DeleteApproved = pForm
_Form.DeleteApproved(pObj)
modified on Friday, December 5, 2008 11:05 AM
|
|
|
|
|
Luc Pattyn wrote: Dim _Form as new IDataForm.DeleteApproved = pForm_Form.DeleteApproved(pObj)
This doesn't look right. Isn't it supposed to be:
Dim _Form As IDataForm = pForm
_Form.DeleteApproved(pObj)
|
|
|
|
|
Hi Dave,
of course. I did copy/paste too much, trying to get it sufficiently verbose to
get it VB-like.
|
|
|
|
|
We all have those days where nothing goes right. I just have more of them than most people.
|
|
|
|
|
Hi,
Just a small qustion how many triggers we can have on one Table(or Entity or Object).
Thanks,
Aleem Mohammad.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
u can have many number of triggers in a table but the COMBINATIONS U
CAN MAKE can be 12 only
|
|
|
|
|
Means I didnt get your point pls, many number of triggers on one table. What is meant by this combination.
Is it like Insert - Instead of and After
Delete - Instead of and After
Update - Instead of and After. Do you mean this.
Then how can I have more than 6 combinations on one table?
Can you pls. explain me little much more detail.
Thanks,
Aleem Mohammad.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
Hey Aleem,
I'm not sure what your design specifications and intentions are on this project, but you should try and avoid excessive use of triggers. If you need to perform a bunch of actions before and after inserts (whether it is inserts into other tables, data checks, jobs, etc), you should probably use a stored procedure.
Depending on how you want these actions to occur, you can have transactional logic so that all the changes occur or nothing gets committed. Just from reading your question, I would go this way instead of using multiple triggers.....which could drastically slow down performance - esp. if you start doing this with multiple tables.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Triggers (and cursors) are evil. I avoid both wherever possible.
Why don't you TEST something, stick as many triggers on a field as you can and see if it breaks. Then throw the bloody lot out and design your database with some intelligence!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
LOL - well said.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
I was wondering if there is an easy way to save the properties of the objects such as Checkboxes, Textboxes, comboboxes, etc. in VB.NET that doesn't use the registry. I am looking for a way to write it to a file, then on load read from that file and change the settings back to what they were when it was saved. I have been searching for quite a while how to do this, but to no avail. I was originally thinking that I could write the information to a text file then set the information in that text file to a string and run that string as code however, I couldn't find a way to get the string to run as executable code. If you have any ideas for either of these please tell me. Thanks.
modified 8-Sep-21 21:01pm.
|
|
|
|
|
Running a string as code is both easy, widely documented, and a terrible way to do what you're after.
One possible way is to use reflection to get the properties of each control and store them, then use reflection to set the same properties on the same named controls. An easier way that needs more work as your form changes, is to store specific properties in a format you define and read those to place them back on the controls.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
I use XML to do the form state/size[^]. No reason why you can't use it for controls.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You can use Application Settings to save properties of the objects like Textbox.Text or any other...
|
|
|
|
|
Dear all,
I have a simple program that user can insert unicode or ascii text in a textbox. How to tell it is a Unicode or ascii? Is there any function in .Net?
Thanks.
ma tju
Pengaturcara Perisian
Subang Jaya,Selangor, Malaysia
Ring Master SB MVP 2008
Subang Jaya MOP (Otai)
|
|
|
|
|
All strings in .NET are unicode.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have a simple for each loop that goes through my entire collection, performs tasks and then continues, simple enough right? Th ehwole point of my collection is it traps all changes made so a person can undo them, each collection is a series of changes. The problem is I have to undo them in the order which they where done, and my collection goes from the first entered in the collection to the last, I want to do it the other way around.
Do I have to resort my collection? If so there is no index its just a collection of objects, I was thinking a for loop using count going to 0, but I wasn't sure if that would work considering my collection is of objects and not basic data types like strings or ints.
Any articles, suggestions welcomed. Thanks in advance for the read.
|
|
|
|
|
I guess Reverse method will help you out.
Loading signature. Please wait...
|
|
|
|
|
Load your collection into a Stack<t> and you can just use Pop() to get them off in the order you desire; or, load the collection into a List<t> and iterate from back to front using index counting down. I'd avoid doing a Sort, but if it's a small collection resorting or reversing it may not be noticeable. Honestly, I'd use a collection that has a Count or Length property and then access it by index counting down from max index to 0. If your collection implements ICollection<t> you can load it into a List<t> via one of the overloaded constructors.
Keep It Simple Stupid! (KISS)
|
|
|
|
|
Ben Fair wrote: If your collection implements ICollection you can load it into a List via one of the overloaded constructors.
Thanks, worked like a charm.
I appreciate all the help and suggestions from everyone.
|
|
|
|
|
When adding to the collection, you can specify a key at the same time (if VB.NET) :
myCollection.add(objObject, strKey)
The key must to be unique, so the ID of the object being added will work fine. You can then get to items in the collection using the unique key:
myCollection.item(strKey)
|
|
|
|
|
We talking .Net collection?
You could use a built in system.collections.specialized collection
If you need something really fancy, create something yourself implementing iComparer and come up with ever sort you need. Do a google search on custom search iComparer.
Cheers!
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|