Recent content by sevenhalo

  1. S

    retrieve first row and display the second column in a textbox

    Sorry, I got lazy and forgot something. If you're using the second example, you're going to need to add the parameter to sqlCmd and assign it a value. It's friday; gimme a break :)
  2. S

    retrieve first row and display the second column in a textbox

    Example Table in a database: Field1 Field2 Field3 Rec1Fld1 Rec1Fld2 Rec1Fld3 Rec2Fld1 Rec2Fld2 Rec2Fld3 Rec3Fld1 Rec3Fld2 Rec3Fld3 Do you... Want only Rec1Fld2 no matter what SELECT TOP 1 Field2 FROM tblExample Want Rec#Fld2 based on Field1 SELECT TOP 1 Field2 FROM tblExample WHERE Field1...
  3. S

    enable scrolling in a listbox with databinding

    In the properties of a listbox, under "Behavior" there is a property for "horizontalscrollbar". Is that what you're looking for or are you having problems with it?
  4. S


    My guess is that not every object needs to be compiled to binary pre-run. I have a few class libraries that house alot of my data access functionality. All of my different apps reference those dll's, but I didn't make one for every database. If the JIT compiler compiled every object in that...
  5. S

    Dont Understand Classes.

    You actually have to instantiate the type as 'new' and you can run it as many times as you feel like. Each time it will create a new instance of the object on the heap and change/add the reference on the stack. This creates a reference on the stack: public example as class1 This is the...
  6. S

    Dont Understand Classes.

    Good example. I just would like to clear up a couple things. Although it's not necessary, properties still should have a scope associated. Anything that can have a scope, should have a scope. Also, they normally "return aAge" instead of working like a function. The 'New' doesn't need to...
  7. S

    getting pwds for a particulat username

    Since we're being purists in this thread (not a bad thing :)), I thought I'd just throw this in. Hashed values have been proven to collide. And now with rainbow cracking, it's going to become more and more common. A simple MD5 or SHA-1 won't be enough. You're going to need to add a little...
  8. S

    Update Query generated by the CommandBuilder

    Dim oledemo As New OleDb.OleDbCommandBuilder(Me.OleDbDataAdapter1) MessageBox.Show(oledemo.GetUpdateCommand.CommandText) Is this what you were looking for?
  9. S

    query for gettin a string starin with particular alphabet

    This is for Northwind. It will return all the Company Names beginning with "A" "SELECT * FROM Customers WHERE substring(CompanyName,1,1) = 'A'" (note: case of "A" doesn't make a difference)
  10. S

    Dont Understand Classes.

    Classes/Structures are the backbone of .Net. Here's a quick overview followed by some good references: Classes are reference types. On instantiation (when the constructor 'new' is run), they are created in the heap and a pointer is placed on the stack referencing them. These are for heavy...
  11. S

    Structure Tree Dynamically from XML

    Treeviews are always a nice way to display XML files. Side Note: (My opinions the same for also)
  12. S

    database insertion problem

    It still has a "Field Size" attribute. Did you allocate enough space?
  13. S

    database insertion problem

    are you sure you made the DB's field big enough to hold it?
  14. S

    Need help setting up a form

    You might not want to mention it as "a loss of flexibility," but sell it as "a more concrete business process." I was in your position earlier this year. I came to a company with no other developers, but they had scattered access applications that independant contractors had been building for...
  15. S

    help needed about datagrid

    It happens because you used databinding. Easy solution is to change your SQL query to something like "SELECT FNAME as [First Name], LNAME as [Last Name]..." It can potentially get ugly with joins.
Top Bottom