Jump to content
Xtreme .Net Talk

mhildner

Avatar/Signature
  • Posts

    29
  • Joined

  • Last visited

Personal Information

  • Visual Studio .NET Version
    VS 2003
  • .NET Preferred Language
    C#

mhildner's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello marble_eater, Those last two posts were excellent. I might go play with some MSIL - it'd be interesting to check this out in VB.NET and C# and see what the compilers do. Regards, Mike
  2. Hello Kejpa, You know, I'm not really sure - do they both behave the same? I'm thinking it's a difference between VB.NET and C#. VB.NET seems to do more behind the scenes and you don't have to do that much manual work. If both ways work the same, you're probably saving some code doing it your way. But I'm not an expert at VB.NET and a newbie when it comes to delegates - although I have managed to get some code to work :) Mike
  3. Sounds like you should be using the observer pattern. This article first discusses how to implement using interfaces, then the section titled "Observer Pattern in the .NET Framework" discusses how to achieve using events and delegates. I'd use the event/delegate way. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/observerpattern.asp Mike
  4. FWIW, I've seen this error when connected to sql and you shut down the database. I imagine you'd get the same if you rip out the network cable, but I haven't tried that <s> Mike
  5. FWIW, when I do this I append the data received into a StringBuilder. That way you don't create as many objects, if you're worried about that. The messages I received have a start of text and end of text markers, so I look to see if both are there and extract the stuff in between them. In your code, I'm not sure why you append the received data if it contains your marker, but pre-pend if it doesn't - but I don't know if that's a problem for you. Mike
  6. Hope I understand you correctly. Do you want to have the BinaryLog listen to events in other objects?
  7. Check out this link. Note that that's actually page 2 of the article. Mike
  8. Sorry, missed that part about 2.0. I was going to start a test project, but I don't even see a web app as an option in my Beta 2 ??? I usually do windows forms. I know in a windows form project I have, the InitializeComponent is in a file underneath my form, named something like "MyForm.Designer.cs". What happens when you double-click the button at design time? That should take you to the method that will execute when you click the button at run time.
  9. You betcha :) Let's say your button is named "Button1". In the "Web Form Designer generated code" there's a method named "InitializeComponent". In InitializeComponent, there should be a line that looks like this.Button1.Click += new System.EventHandler(this.Button1_Click); This is saying you want to execute a method named "Button1_Click" when you click Button1. You should also have a method something like private void Button1_Click(object sender, System.EventArgs e) { } Make sure the button is wired to the right method name. If that's not enough info for you, post your code so we can check it out. Mike
  10. You sure the event handlers are still wired up properly? Do you know how to check that? Mike
  11. I'm not sure if this helps, but I've had the same problem with a deployed app. Windows updates, un/re-install of both .NET and the app did not help. I compiled again and things worked fine. So I thought I just had a buggered assembly. You may want to try just copying your debug or release folder over and run by clicking the .exe. You don't need anything else, except .NET installed on the machine, or any other folders you create for help, images etc.
  12. That's the general idea. Joe Mama is correct in that you're mixing up some terminology. Those methods exist in the business object, not the data access class. Our business objects usually have a few basic methods we use from a template, such as: public DataSet GetAll() public DataSet GetByPK(int primaryKey)More "get" methods are added and tweaked as needed. Note that a DataSet is returned (although it's not limited to that). Because of all the code in your base business objects and ADO.NET, you get your DataSet, change/add/delete data if you want, then call something similar to myBusinessObject.Save(). There's no need to write any of your "Set" methods. A couple posts ago you mentioned a business object method and a form method. Both those methods should reside in the business object (you might tweak 'em a bit first). As far as moving your multipled INNER JOIN etc. code, you might think about making them stored procedures or views and creating business objects from that. I was going to go on about why all this is a good idea, but this post is too long already. Adios, Mike
  13. LOL. The first time I heard that I thought the same thing - why? You'll see the 16 byte rule mentioned over and over. My question is, why is that? Not that I have any evidence myself, I've never bothered to perf it out. Sometimes you hear something so many times from people that are smarter than you, you just take it for granted. Here's a better explanation, along with a disclaimer of course. Scroll down to "Data Size". Mike Edit: Allow me to point out that the above link mentions that there is a trade off between copying the bytes of a value (structure) and allocating a new reference on the heap (class). That does make sense.
  14. This is a decent write up on that - http://www.developerfusion.co.uk/show/4341/7/ Two things I think are important with structures is speed - the 16 byte rule and that they're allocated on the stack, not the heap, like clases are. Mike
  15. Yes. By far the best way to seperate things is through the use of business objects. Business objects usually have an associated data access class. The data access class is DB specific, but the biz object is not. Unfortunately Microsoft doesn't do much for you here. They do have a Data Access Application Block, I haven't used it as I've seen no support for biz objects. It's a free download, and I'd use it over using nothing. Although pricey (USD $700), the Mere Mortals Framework has (among other things) really well designed biz ojbects. It also ships with the source code. Mike
×
×
  • Create New...