Thursday, November 15, 2007

VB6 connect to mysql

Private Sub cmdConnectMySQL_Click()

Dim cnMySql As New rdoConnection
Dim rdoQry As New rdoQuery
Dim rdoRS As rdoResultset

' set up a remote data connection
' using the MySQL ODBC driver.
' change the connect string with your username,
' password, server name and the database you
' wish to connect to.

cnMySql.CursorDriver = rdUseOdbc
cnMySql.Connect = "uid=YourUserName;pw d=YourPassword;
server=YourServerName;&qu ot; & _
"driver={MySQL ODBC 3.51 Driver};
database=YourDataBase;dsn =;"
cnMySql.EstablishConnection

' set up a remote data object query
' specifying the SQL statement to run.

With rdoQry
.Name = "selectUsers"
.SQL = "select * from user"
.RowsetSize = 1
Set .ActiveConnection = cnMySql
Set rdoRS = .OpenResultset(
& nbsp; &n bsp; rdOpenKeyset, rdConcurRowVer)
End With

' loop through the record set
' processing the records and fields.

Do Until rdoRS.EOF
With rdoRS

' your code to process the fields
' to access a field called username you would
' reference it like !username

& nbsp; rdoRS.MoveNext
End With
Loop

' close record set
' close connection to the database

rdoRS.Close
cnMySql.Close

End Sub

Proxmox installation display out of range

Reference:  https://forum.proxmox.com/threads/proxmox-ve-screen-out-of-range.131297/