Jump to content
Xtreme .Net Talk

Tim Field

Members
  • Posts

    21
  • Joined

  • Last visited

Tim Field's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I figured no-one would know this!
  2. I'm fixing an ftp program at the moment and I'm stuck. The ftp server is on Windows. The timeout on the server is about 120 seconds, I want the transfer to resume where possible. To test this I pull the network cable out of the computer then put it back in. This works if I do it for a few second intervals and it starts up. If I do this for say 10 seconds the server kicks me out "Remote host has terminated your connection" or similar mesage. Anyone got any ideas? The same thing happens when using FileZilla. Are they any commands I can send to sort this???? Thanks, Tim
  3. Hey Wraith. Thanks for that. Q1 makes sense. Can I double check Q2 with you... you are saying my ClearAllAttributes method would work. Cheers, Tim BTW seems like lots of my fellow xperts at work here don't know this stuff!
  4. Hi All, I've asked around and no-one seems to be able to answer me!... Here's my question(s): All in C#: Abstract collection based on an arraylist "ab_collection.cs" Abstract entity object which stores ID and Description "ab_entity.cs" Real collection based on abstract collection "number_of_people.cs" Real object based on abstract entity "person.cs" Question 1: If I put an add method on my abstract collection public void Add(ab_entity entity) { addme(entity); } When I inherit the method within "number_of_people" will it loose any of my entity if I pass a "person" object to it. Question 2: If my "person" entity has additional storage of FirstName and Surname, can I call an undo on the base class?.... Method on my abstract entity public void ClearAllAttributes(ab_entity entity) { foreach(abstract_attribute aa in entity); { aa.clear(); } } Would this method clear the FirstName and Surname or just the ID and Description that are on the abstract class? Thanks all, Tim
  5. :confused: My XML: <school_address>Main Office<br/>Mercian Avenue<br/>Cheltenham<br/>Glos.<br/>GL52 3ED<br/>United Kingdom<br/><school_address> My XSL: <xsl:value-of select="/root/school_address"/> How do I get the BR's to work? They just print out as normal, I actually want a line break. Thanks, Tim
  6. Many thanks for the info.
  7. Hi all, I have a string containing xml that I'd like to pass to an xpathdocument, anyone got any idea how to do this? Thanks, Tim
  8. Hi Guys, Thanks for trying to suss this out. Ok here's why and what I'm trying to do. I did try to make this example simpler! I have an abstract class that will have this reflection functionality on it. From this I have around 20 classes that inherit. Each of these will have various objects on them called IntergerAttribute, DoubleAttribute, StringAttribute etc. These "attributes" are actually objects that store the data and can do a fair bit of validation, e.g. DoubleAttribute can have a max and a min. It can also be set to read only. So as I add more and more of these classes based on my abstract class I'd like reflection to pick up the "read only" functionality. Is that clear? Thanks, Tim
  9. Stuck on a bit of reflection.... Hi all, I'm not 100% on what to do here so hopefully someone can help out. I have a class that has various objects on it. These are one of the following... stringAttribute doubleAttribute integerAttribute and each on holds a field from the database (obviously this is loaded into C#). On these there is a property called ReadOnly. Where it is one of these properties I'd like to get ReadOnly to whatever is passed in. I'm not sure how to do this a rough guess is below. Am I along the right lines??? Thanks! Tim public void SetReadOnlyForAllAttributes(bool readonly) { Type MyType = Type.GetType(testclass); MemberInfo[] MyMemberInfoArray = MyType.GetMembers(); for ( int counter = 0; counter < MyMemberInfoArray.GetLength(0); counter++ ) { if (MyMemberInfoArray[counter].MemberType.ToString() == "stringAttribute") { MyMemberInfoArray[counter].ReadOnly = readonly; } } }
  10. Just a standard connection from C# here, this works with a small amount of data but not a large set. Do I have the syntax wrong?? Thanks, Tim SqlConnection mySqlConnection = new SqlConnection(); string strConn = ""; strConn = "Data Source=" + this.textBoxInstance.Text + ";" ; strConn += "DataBase= " + this.textBoxDBName.Text + ";" ; //strConn += " Integrated Security=SSPI ;" ; strConn += "User ID = sa;" ; strConn += " connection timeout = 10000000;" ; //connection timeout mySqlConnection.ConnectionString = strConn; SqlCommand cmd = mySqlConnection.CreateCommand();
  11. Hi all, I'm trying to do the following in xslt. :confused: The "line" under surname is what I'm after. ------------------ -Surname - ------------------ - Jones - - Smith - - Thornton - - Field - ------------------- This is my table so far but what do I add to get it to do this? TABLE.tblmain { border-style: solid; border-width: 1px 1px 1px 1px; border-style: solid; border-color: #99CCCC; padding: 4px 6px; text-align: left; font-family:Tahoma,Arial; font-size:9pt; } Thanks! Tim
  12. Any tips, these are nasty! Thanks, Tim
  13. Hi All, I have an application that needs to print forms with data all over the place (it will look like a questionairre) and have grids etc. I can export XML from my application and do some sort of transformation (unknown) and then put this into Microsoft Word, or I can use Active Reports (not sure about these yet) or maybe there's something else I don't know about! Anyone got any ideas as the best way to accomplish this?? Appologies if this is a general question, I'll add more details if you ask for them. Thanks, Tim
  14. Thanks v. much!
  15. If I had two datatables. e.g. Car and Passengers. Car CarID, Colour, Type 1 , Red, Jaguar 2 , Blue, Lotus Passengers PassengerID, PassengerName, CarID 1 , John, 1 2 , Phil, 2 3 , Paul, 2 And wanted to output these in XML with Car as the master node what would use in C# ?? Thanks, Tim :D
×
×
  • Create New...