|
That's a perfectly reasonable error message:
- It's aimed at developers, so it can assume you'll know, or be able to find out, what managed, unmanaged and PInvoke mean;
- It tells you what's wrong; (your PInvoke method signature)
- It tells you where the problem is; (the import of exam123-DB!exam123.Exam123F::Sleep)
- It tells you how to fix it; (correct the signature)
It can't do much more for you, since unmanaged methods don't have enough metadata for the compiler to tell you what the correct signature should be.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Biggest error I ever seen is "Your Windows is successfully installed". Yes, it was MY fault. )
|
|
|
|
|
Have you considered fixing yourself?
|
|
|
|
|
Tried many times - with OS/2, Linux, FreeBSD, QNX... hell knows how I hate ugly Windows but still have to use it. Now I'm developer, hooked on .NET;
|
|
|
|
|
I personally really hate the error GDI throws whenever anything goes wrong.
"A generic error has occured in GDI+".
Like, 'You don't say' much?
|
|
|
|
|
"Nullable object must have a value"
No further comment required.
|
|
|
|
|
Must have been written by a developer after checking his bank account
|
|
|
|
|
In many database solutions folk tend to use tables with one to many relationships in order to hierarchal data where as the following achieves the same.
ID - Field1 - Field2 - ParentID
1 x y 0
2 xx yy 1
3 rr r 1
4 pr p 2
modified 3-Oct-12 12:25pm.
|
|
|
|
|
I won't downvote you for this but it is entirely the wrong place to post your code. If you really want to post this turn it into an article.
I would remove it rather quickly if I were you, before it does get downvoted and obliterated.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Please remove Thread
Regards
|
|
|
|
|
I don't have the power to do that I'm afraid.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Top of Page: The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.
I'm guessing the OP thinks this is a brilliant data structure (though I don't agree).
|
|
|
|
|
To be fair he is a n00b and the original post had much more code (not that it was any more insightful but we all have to learn, somehow).
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
The illustrated structure is not the normal approach to db design and not tought to everyone, It wasn't in my day. But is now given in some hard back publications, for the intermediate skilled person, as an example of how to use a database to run the .net menu control.
Some folk prefer to code XML files to run the .net menu controls, but others prefer a database. Thus allowing one to standardise on using datbases for everything rather than a mix of db and xml on a website.
The structure is also great for managing lists as one does not need one table for the list name and one for the list items, less overhead
For example it is great for the storage of dropdown list values as one can basically use the same sql for all dropdown controls - just passing a different 'ParentID' to get a different data set for the control.
This simplifies life in some areas when buildiong a N-Tier Application -
Select field1, field2 From table Where ParentID = @ParentID
is all you would ever need to code against/use to retrieve any list!
It all boils down to preference, what you need to do and how you have been tought!
The structure is not for everyone and everyone should always use what they are happiest using.
Happy coding
|
|
|
|
|
this way you just take out the meaning of your data.
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Somewhen in the past, hierarchical databases were used. For example, the programming language MUMPS was advertised as a programming language with integrated database - and that database was a hierarchical database.
Somewhen later, hierarchical database were given up. Can you guess why?
|
|
|
|
|
Thenks for the feedback
In many instances hierarchical is totally not worth looking at and can be a nightmare to manage, but there is a place for it, and when used with an interface to meet a functionality requirement it can be a great advantage.
Expearience has shown that hierarchical data in a single table can be very effective when the user interface mimics that of a file management system to manage the data and you proved breadcumb navigation to go back a level or two.
In short - hierarchical data to more than a few levels is not for the faint hearted and even then you realy need to be sure that you understand what you are getting yourself into. (be prepared for developing some prity elaborate loops and/or non pimple coding)
Sitting on my bookshelf are numerious intermediate level books that show how to use hierarchical data to power .net sitemap and menu controls from a database rather than xml files.
So whilst programming languages like MUMPS have dissapeared there is still a requirement for the strategic use of hierarchical data. The key word being STRATEGIC.
For those who want to investigate things further #IHierarchicalDataSource Interface# can be found at http://msdn.microsoft.com/en-us/library/d3ef7363(v=vs.90).aspx ####
ASP.net 3.5 Unleashed by Stephen Walther Chapter 19 gives a blow by blow example with sample code for binding a menu control directly to the database - a Hierarchical table.
Happy coding
|
|
|
|
|
You may be interested in another way of doing hierarchical data in a table. It looks a bit like this:
Id | ParentId | IdPath | WhateverData |
---|
1 | NULL | 1 | Blah | 2 | 1 | 1_2 | Blah | 3 | 1 | 1_3 | Blah | 4 | NULL | 4 | Blah | 5 | 2 | 1_2_5 | Blah | 6 | 5 | 1_2_5_6 | Blah |
If you include the full path of ID's (the ID and all ancestor ID's), you can reduce the number of queries required to get all descendents of a record. I think newer versions of SQL Server have some ability to query hierarchical data, but this approach will work on all SQL systems.
|
|
|
|
|
Nice alternative, but not sure how easilly it could be used to power a menu control.
With regards to reducing SQL work I can see that it would have benifits.
|
|
|
|
|
:not
as in:
a:not([href]) { color: inherit; text-decoration:none; }
This makes all A tags that don't have a href (eg a <a name=...> bookmark) take their colour from their parent and removes the hover underline.
I just thought it was eloquent enough to share.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Huh. Useful in some situations, eh?
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image.
Stephen Hawking
|
|
|
|
|
Thanks for this, Chris, I think there could be a lot more to it than is immediately apparent.
The older I get the better I was
mikeo
|
|
|
|
|
Nice. Are there any (*: doesn't work in browser X) conditions on this? I know the conditional selectors generally don't play nicely with IE.
|
|
|
|
|
BobJanova wrote: Are there any (*: doesn't work in browser X) conditions on this
No support on IE8 and earlier, unfortunately.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Bah... No one uses old browsers like that anyway...
I wasn't, now I am, then I won't be anymore.
|
|
|
|