Search results

  1. V

    Question Most efficient way to save boolean value with history

    Thank you very much. This was a very informative and helpful response. I think I used a "history" table like the one you described on another project and promptly forgot about it. I think I'll use it again here. Also thanks for the tip about the boolean value. I saw an example that used the...
  2. V

    Question Most efficient way to save boolean value with history

    I'm making a tool to help some team members process some things more efficiently. Originally it was just for one person, but now several people are using it, and I'm trying to coordinate their efforts so they don't end up working on the same things. With that in mind all I really need to do is...
  3. V

    Question Insert from Select Statement

    Oh wow, I forgot that I posted this. My original post was incomplete, and I think the stuff I left out was probably important. I did eventually get it to work by simply coding the SQL explicitly instead of using the view. How about I just post the actual code that I have instead of the...
  4. V

    Question Insert from Select Statement

    Okay, I'm extremely frustrated with this, especially since I know I'm probably just doing something really stupid. Basically I've got two tables with nearly identical structures (simplified here for clarity...I hope)CREATE TABLE MyTable1 ( ID NUMBER, STATUS_CODE NUMBER...
  5. V

    Question Scraping web page: Protocol Violation

    I've got some equipment that I can connect to via my web browser to get some diagnostic info. A friend wrote a Bash script on his Linux machine to scrape some of that data, and I'm trying to mimic that functionality in .Net. The problem is I'm getting a Protocol Violation that neither my...
  6. V

    Question Default value at declaration or in constructor?

    In essence I think you're saying that setting default values at the declaration should be preferred when possible, if for no other reason than for readability. Setting it in the constructor should be done only when necessary, or when setting it at the declaration would actually decrease...
  7. V

    Question Default value at declaration or in constructor?

    One would think I'd already know this, but I never really gave it much thought before now. When declaring a member variable for a class, is it better to set the default value at the declarationPrivate m_strMyVariable As String = ""Or is it better to do it in the constructorPrivate...
  8. V

    Question Making Oracle SPs act like Sql Server SPs?

    Apparently this isn't possible. Everything in my code uses Odbc, so being forced to use Oracle.DataAccess.Client kind of sucks, but at least it works. In the end I decided to go with something like the following: --Disclaimer: the following code is untested. --I wrote it in a few minutes just...
  9. V

    Question Making Oracle SPs act like Sql Server SPs?

    I had been under the impression that Stored Procedures were essentially queries stored in the database for easier consumption and alteration without having to change consumer code. Clearly I was mistaken, since Oracle apparently doesn't use SPs in that way at all. In particular, coming from Sql...
  10. V

    Question OO Design: Use Getters/Setters Interally?

    This is probably a stupid question, but when accessing an attribute from within a class is it generally better to access the private variable directly, or access it using the getter/setter? Of course the whole point of encapsulating attributes is to allow changes to the underlying code without...
  11. V

    Question Weighted Average for Log In Percentage?

    As part of some performance stats that I've been maintaining for employees where I work I've had to calculate the total percentage of time that they spend logged into their computers. Getting the necessary values is a nightmare, but ultimately the final calculation is quite simple...
  12. V

    Question Observer Pattern for Logging?

    About a year ago I threw together a quick and dirty logging system for my class library (it's a dll) using the Observer pattern. Essentially the entire library shares an Observable class through which all messages are sent. Any code using this library can create an observer and subscribe to that...
  13. V

    Question Attaching a file that doesn't exist

    Jeez, I feel kind of foolish. Both of my last questions had very simple answers that I could have easily found myself with even a cursory look at the documentation. The MSDN library will now be the first link I try when I have a question. Thanks for your clear and concise answer, and for acting...
  14. V

    Question <Attribute>: ParamArray in Constructor

    Thank you very much. I wasn't typing the colon. I fell victim to the old "If the answer is not on the first page of a Google search, then it doesn't exist" syndrome which I've chided my friends on. The link that you provided was actually halfway down page 2. A little persistence (and I mean even...
  15. V

    Question <Attribute>: ParamArray in Constructor

    Hmm...every time I tried it gave me an error. Looking online it seemed that you could essentially skip optional parameters by using blank arguments, but that you couldn't actually refer to them by name in VB. For example, a sub with the definition Public Sub MySub(ByVal Param1 As Integer...
  16. V

    Question Attaching a file that doesn't exist

    I've got a logging system that emails me log files whenever certain conditions are met. Unfortunately I find myself in a situation where I am not allowed to write files to the disk that my program is running on. For the time being I'm just saving the logs internally as a big a-- String instead...
  17. V

    Question <Attribute>: ParamArray in Constructor

    A former co-worker wrote a class in C# that was to be used as an attribute. I'm having to convert his work to VB (yeah, it's pointless and way more work than necessary, but management thinks it's a good idea). Unfortunately I'm having an issue because one of the main properties of the class is...
  18. V

    Question Dump Query Results Into Text File

    I've got a whole bunch of data that is stored in various Access databases that I need to transfer over to an Oracle database. Right now I'm just creating an Odbc connection to the Access file, reading the data, creating an Odbc connection to the Oracle database, then looping through the data...
  19. V

    Question Sybase: DateTime Column Named Timestamp

    I'm trying to get data from a Sybase database for a DAL in VB.net via a DataSet object (.xsd file). This in and of itself isn't a problem, except that the tables that I am trying to access have a column named Timestamp, which is a DateTime type column. This means that when I attempt to select...
  20. V

    Question AddParameter Method results in "ORA-00936: missing expression"

    As usual I'm copying other people's code and modifying it for my own purposes. Also as usual it's not going so smoothly. Essentially someone wrote some helper methods for a DAL using Sql Server, and I'm trying to convert it so that it can access Oracle instead. Here are the methods as I've...
Top Bottom