Dim DSN As String
Dim dbMySQL As DAO.Database
Dim rs As DAO.Recordset
'1. Apertura dinamica (non richiede file DSN)
DSN = "ODBC;DRIVER=MySQL ODBC 3.51 Driver;DESC=;DATABASE=phpdev;SERVER=localhost;UID=username;PASSWORD=password;PORT=3306;OPTION=2072;STMT=;"
Set dbMySQL = OpenDatabase("", False, False, DSN)
'2. Apertura Recordset
Set rs = dbMySQL.OpenRecordset("SELECT * FROM MyTable ORDER BY ID", dbOpenDynaset)
Data1.DatabaseName = ""
Data1.Connect = ""
Set Data1.Recordset = rs
Data1.Refresh
rs.Close
Set rs = Nothing
Cercavi questo?
Giovanni
---
http://www.y2ksw.com/vbulletin