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!!

Recommended Answers

All 2 Replies

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

follow the link for your question

link

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.