Jump to content
Xtreme .Net Talk

DannyT

Avatar/Signature
  • Posts

    36
  • Joined

  • Last visited

Everything posted by DannyT

  1. I'm trying to get into the proper ways of oop, design patterns and everything. I've picked up alot the past few weeks but I still keep getting unstuck on seemingly really simple issues. Current confusion: - I'm UMLing a web application, situation summarised is: - Members (i.e. users) can log in, view events (I.e. an event held at a specific location), attend events, leave messages about events etc. In my class diagram i have a Member class and an Event class. Where would a method such as viewEvent() go on the Member class because a member can view an event or on the Event class because it is the event that can display its details????? Also how would i represent the relationship as the potential candidates for relationship as i see it are: - Event - is viewed by - Member Member - views - Event Event - is attended by - Member Member - attends - Event etc etc... Examples all make perfect sense "Student attends course, College has courses" etc etc, so i keep feeling like an idiot trying to get my head around my own application designs! :confused: Any pointers in the right direction mucho appreciated.
  2. Had to fudge it by creating a dataset at design time that was the same scheme as the results returned from my query. If anyone knows of a better way then please let me know.
  3. Now that's one enthusiastic reply! Cheers JM, will certainly check them out. OOP, design paterns and 'proper' syntax isn't total noobage material to me, i've done a lot of actionscript 2.0 (macromedia's wanna be oop effort) and have done alot of reading around the subject. Just feel now is the time to get properly stuck into it all. Just for anyone else that's interested, as an almost more recent extension of the gof book check out Head First absolutely awesome book and quite possibly the final inspiration for me to delve into OOP full on. Dan
  4. Thanks mhildner, will be partaking in a lot of reading on this matter i think. I really like the concept, just need to work on my know how. has anyone else used the Mere Mortals Framework? They talk a good product on the site but i'd like a few other opinions before thinking about forking out that sort of dosh!
  5. I am trying to populate a crystal report (vs.net 2003) with a dataset that i am dynamically creating and populating with the results from an oracle stored procedure. So far i can create the Crystal report but only by using the Report Expert, this only lets me select tables and fields with which to populate the report and not a stored procedure (which i believe is the case with a mssql db). So the report always shows all records for the linked tables' fields that i wish to present. In my app I create and populate a database from a complex stored proc that is based on many parameters. I would ideally like to use the data in this dataset to populate my report. I've been searching all day for something to help with this but can't find anything. Any help VERY much appreciated! Cheers, Dan
  6. Are there any best practice/design patterns geared towards database access in OOP for .net? I.e. how to keep objects seperate from the database calls to maintain maximum reusability of classes. OOP is still pretty new to me so apologies if the wording isn't great, i know what I want to achieve just need to get a bit more grasp on the concepts/practices. Cheers, Dan
  7. thanks i'll take a look at that
  8. I'm about to embark on my first asp.net project, I have a fair grasp of oo (theory more than practical experience) and have done a little bit of vb6 & vb.net windows app work. When using an object orientated approach to an asp application, what is the scope of an instantiated object? Can/how are objects passed between pages? For example if i were to create a news article class and instantiate it on one page, could i use that same instance on another page or would i need to re-instantiate? Apologies if this is a dumb question, have only just started preparing and this is one of the first queries i have. Any help much appreciated, Dan
  9. I'm trying to execute the following oracle procedure from my app: CREATE OR REPLACE PROCEDURE sp_manual_order (i_order_no IN tbl_orders.order_no%TYPE, o_order_id OUT tbl_orders.order_id%TYPE, i_xfactory IN DATE) IS BEGIN --insert order INSERT INTO tbl_orders(order_no, client_name, postcode, picked_date) SELECT i_order_no, 'Manual Order', 'MAN01', to_date(i_xfactory) FROM dual WHERE i_order_no NOT IN (SELECT order_no FROM tbl_orders); -- get just added order_id SELECT order_id INTO o_order_id FROM tbl_orders WHERE order_no = i_order_no; END; / I'm using the following to call the proc: With cmdOrder .Connection = getCn() .CommandText = "sp_manual_order" .CommandType = CommandType.StoredProcedure .Parameters.Add("i_order_no", OracleType.VarChar).Value = i_order_no ' valid value E.g. "TEST" .Parameters.Add("i_xfactory", OracleType.DateTime).Value = i_xfactory ' valid date break point shows "#5/3/2005 11:07:44 PM#" (originally from a dateTimePicker control .Parameters.Add("o_order_id", OracleType.Number).Direction = ParameterDirection.Output End With openDb() ' execute the function cmdOrder.ExecuteNonQuery() ' ********errors here********* ' MsgBox(intRowsAffected) closeDb() intOrderId = cmdOrder.Parameters("o_order_id").Value I'm getting the error: "An unhandled exception of type 'System.Data.OracleClient.OracleException' occurred in system.data.oracleclient.dll Additional information: System error." With the associated oracle error as: ORA-01458: invalid length inside variable character string This is my current bugbare driving me nuts so as always, any help much appreciated! Cheers, Dan
  10. I have an array of values that match some of the values (as in valueMember not displayMember) within a multi-select listbox bound to a datatable from a dataset. I want to select all the items in my listbox where the items value is in my array. I can't seem to figure out the right syntax. I currently have For Each anItem In lstMachineStatus.Items If anItem.Item("query_id") = arrMachineStatus(n) Then 'how do i get the listboxes index of anItem to place in below? lstMachineStatus.SetSelected(SOMETHINGHERE, True) End If Next any help much appreciated
×
×
  • Create New...