954,559 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Creating User Manual in Vb6 and Populating TreeView from Mysql database VB6

Hello everyone..How do i create a user manual or the instructions of the software in vb6? Is it possible to pattern the manual with the manual of mysql or the like..

Another question. How do i populate my treeview in vb6 from a mysql database??

Any help would be very much appreciated..Thank you!!

jwill55
Newbie Poster
1 post since May 2008
Reputation Points: 10
Solved Threads: 0
 

Part 1 - VB5 or 6 to MySQL
Using ODBC 3.51 connector

Set DB = New ADODB.Connection
Set RS = New ADODB.Recordset
DB.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" & _
                      "SERVER=" & sHostName & ";" & _
                      "DATABASE=" & sDBName & ";" & _
                      "UID=" & sUID & ";PWD=" & sPWD & "; OPTION=3"
DB.Open
    
    Set RS = DB.Execute("SHOW TABLES", ret)
    Set cTable = New Collection
    While RS.EOF = False

'get the data from the database columns 
'(not fields because "real" databases have 
'columns of data, not fields of entries) :) according to some professor in SQL

'-- not applicable code here
'--             vTable = RS.Fields(0)
'--            cTable.Add vTable
'-- not applicable code here

        RS.MoveNext
    Wend
    DoEvents
    
'// do your stuff here...

Set RS = Nothing
DB.Close

'// as usual...


!!!REPLACE THE "SHOW TABLES" WITH YOUR OWN SQL QUERY!!!

Part 2- TreeView

See helpfile in VB for info on...

"Add Method (Nodes Collection)"

It has the example at the end of the listing.

Dim nodX As Node	' Declare the object variable.
Dim I as Integer	' Declare a counter variable.
For I = 1 to 4
	Set nodX = TreeView1.Nodes.Add(,,,"Node " & Cstr(i))
	' Use the reference to set other properties, such as Enabled.
	nodX.Enabled = True
	' Set image property to image 3 in an associated ImageList.
	nodX.ExpandedImage = 3
Next I
javmedia
Light Poster
36 posts since Mar 2009
Reputation Points: 22
Solved Threads: 5
 

follow the link for your question

link

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You