Jump to content
Xtreme .Net Talk

quwiltw

Leaders
  • Posts

    493
  • Joined

  • Last visited

Everything posted by quwiltw

  1. The Finally block *always* gets executed.
  2. Sure. http://www.webopedia.com/TERM/H/hack.html Meaning, someone here modified the software to provide this functionality, it's not built into the vBulletin software.
  3. This may be getting into personal preference, but I like to put the close in the Finally block to ensure it always gets closed. Try 'do your stuff Catch ' catch your exception Finally If Not m_objConn Is Nothing AndAlso m_objConn.State.Open Then m_objConn.Close() End If End Try
  4. Just put your current writeline inside the Remove method in a loop. If this doesn't work, post your project and I'll take a look. Dim Writer As StreamWriter = File.CreateText("Temp.txt") 'Here you're removing the item. ListBox1.Items.Remove(ListBox1.SelectedItem) Try 'I think you'd be alright if you just put this in a loop of *all* ' the remaining items. Dim i As Integer For i = 0 To ListBox1.Items.Count - 1 Writer.WriteLine(ListBox1.Items.Item(i)) Loop Catch x As Exception Finally Writer.Close() End Try
  5. A hack so good, I assumed it was a part of the software. Thanks for the explanation.
  6. Hey Laura, that's something that's seemed weird to me too. If someone selects in their preferences to get email replies, they likely want them regardless of "how" they reply. Maybe this is corrected in the next version of the software?
  7. This sample app has source code that will do the trick. Have a look and if you get stuck, post your question. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvssamp/html/vbcs_ProcessViewer.asp
  8. Add a reference to Form1 on Form2 and expose the DataSet through a public property on Form1. There are perhaps better ways but I think I'd need more insight into what you doing than the one-liner you've provided.
  9. On first glance, it looks like your remove method is just writing one item back to the list. The easy way would be after an item is deleted to loop through the list of remaining items, writing each one to the file. You shouldn't have to create the Temp file either.
  10. For some reason I always find myself using Datasets, but it seems like you should be able to stuff @@ROWCOUNT into an output parameter as a workaround?
  11. Here's some old code I played around with for a while. You can probably figure out how to change it to fit your needs. Shared Sub New() cnnStr = GetConfig("connectionString") strRootDir = GetConfig("rootDir") intRecentDefinition = GetConfig("recentDefinition") strRootWebDir = GetConfig("rootWebDir") End Sub Private Shared Function GetConfig(ByVal key As String) As String Try Dim xmlDoc As New XmlDocument() xmlDoc.Load("..\Config.xml") Return xmlDoc.SelectSingleNode("//" & key).InnerText Catch ex As Exception Throw New Exception("Error reading configuration file: Config.xml", ex) End Try End Function
  12. Actually I just noticed Robby posted some sample code that looks appropriate to your question. You might want to check it out. http://www.xtremedotnettalk.com/showthread.php?s=&threadid=71636
  13. Yep. The easy way I think is to set up a DataAdapter (specifically, the InsertCommand/UpdateCommand/DeleteComand propertyies) and call it's Update method passing in the datatable. There are numerous examples online for this.
  14. Add a relation in the dataset, then you can get at the orders through GetChildRows().
  15. http://msdn.microsoft.com/netframework/productinfo/overview/default.asp
  16. If the .NET Framework is installed, then yes.
  17. I'm sure many of us can help, but since this sounds like a school assignment, I'd prefer you demonstrate that you've actually given it some thought. If you post specific questions, you'll get specific answers. If I've drawn the wrong conclusion, then you should be using the BinarySearch method built in to the appropriate data structures in the framework instead of writing your own anyway. On the other hand, if you knew it was a case that demanded you implement it yourself, you would likely also know how to do it:)
  18. Yep it'll work, just not the ideal design.
  19. To facilitate one user having more than one account (ie. Savings account, checking account, money market account)
  20. Just from a basic understanding of your problem, I see three tables: tblUsers (userID, firstname, lastname, pw, etc) tblAccounts (accountID, userID, bankName, serviceCharge, startBalance, address, etc.) tblTransactions(transactionID, accountID, ammount, endingBalance) Then each user can have multiple accounts, which in turn have multiple transactions. To get all the users accounts would be something like: select * from tblAccounts where userID='quwiltw' of course it'd be even simpler if the user could only have one account, but that isn't clear in your problem.
  21. Ok, I think I'm tracking with the concept now. Now I'm trying to get a handle on a real-world problem that it could be used to solve (ie. non-gaming). Got an example of that?
  22. So an IIndividual has, say, a collection of attributes (IGenes?) which mean little until they are introduced into the IEnvironment. At which time the attributes can be inspected for those that are considered "weaknesses/strengths" for that particular environment, which will ultimately determine whether it can survive in the environment based on some environmental threshold? Wouldn't there have to be a collection of IPopulations in the IEnvironment? Am I totally missing you?
  23. Yep. You've successfully confused me:) Maybe you could either enhance your example, specifically to show how the IGene is related. If you have an idea of what the methods are on these interfaces, it'd probably give more insight into what you're getting at too.
  24. If you're talking about the commented out lines, then it's likely because you're trying to pass a url to the Exists method that is expecting a path. I *think* you'd need to use WebRequest if it's a url and File.Exists if it's a local or network path.
  25. I'll expand my issue then to include your current solution;) I think it's an odd, and one I've never seen, situation where each user needs it's own table. In fact, I'd go so far as to say the data model is fundamentally flawed if that's the case. If you don't care, I suppose I'll live with it:) But as I said, we could probably help get it straight.
×
×
  • Create New...