Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. Dim vnt_colRS As Variant: Dim mysqlstr As String
  2.  
  3. Set oConn = New ADODB.Connection
  4. oConn.Open "DRIVER={MySQL ODBC 5.3 ANSI Driver};" & _
  5. "SERVER=localhost;" & _
  6. "DATABASE=wynk;" & _
  7. "USER=root;" & _
  8. "PASSWORD=root;" & _
  9. "Option=3"
  10. Set rs = oConn.Execute("SELECT * FROM tblZip order by zip desc Limit 100")
  11. Do While Not rs.EOF
  12. Debug.Print rs.Fields("Zip").Value
  13. rs.MoveNext
  14. Loop
  15.  
  16. Debug.Print oConn.ConnectionString
  17. oConn.Close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement