View SQL Server 2000 db in VB6 listview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lightyagami
    New Member
    • Jan 2008
    • 12

    View SQL Server 2000 db in VB6 listview

    gud day...

    please help me with my project...
    how can i view the database from sql server 2000 in vb6 list view?
  • daniel aristidou
    Contributor
    • Aug 2007
    • 494

    #2
    Originally posted by lightyagami
    gud day...

    please help me with my project...
    how can i view the database from sql server 2000 in vb6 list view?
    You will have to use a loop and the list.additem methods

    something like

    Code:
    Dataset.recorset.movefirst
    Do while not Dataset.recordset.eof
    
    List.additem Dataset.recorset.<feild>
    Datset.recordset.movenext
    Loop
    Thats wht you should base your code on
    What project is this since there are rules as to what we can help you with.
    Daniel(~_~)

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      1.Open the conection to sql server
      2.Open the recordset as desired.
      3.Follow as suggested in the previous post.

      Comment

      • lightyagami
        New Member
        • Jan 2008
        • 12

        #4
        ----->>>>>
        yes i've done it but how can i modify/edit the listview like changing the font color,back color of every 2nd row,and others...?

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          Originally posted by lightyagami
          ----->>>>>
          yes i've done it but how can i modify/edit the listview like changing the font color,back color of every 2nd row,and others...?
          listview does not support all those properties directly.
          You might need to use some 3rd party control for the same.

          Comment

          • QVeen72
            Recognized Expert Top Contributor
            • Oct 2006
            • 1445

            #6
            Hi,

            To Alternate the Colours in ListView, You have to use API's (User32.dll, and Kernel32.dll). and loads of Codes in .bas module.
            if you still Want, Check This

            A Simple way out is to use a "FlexGrid" control, Changing any Property of this grid is quite simple..

            Regards
            Veena

            Comment

            Working...