Showing posts with label MySQL ODBC Connector. Show all posts
Showing posts with label MySQL ODBC Connector. Show all posts

Friday, February 3, 2017

VBScript MySql connection

You have to install mysql odbc connector first.

Dim Connection, ConnectString

ConnectString = "Driver={MySQL ODBC 3.51 Driver};Server=localhost;PORT=3306;Database=database;User=root;Password="

Set Connection = CreateObject("ADODB.Connection")

Connection.Open ConnectString

Sql = "SELECT id,created_at FROM table ORDER BY id DESC LIMIT 0, 10"
Set Result = Connection.Execute(Sql)

Do Until Result.EOF
    Wscript.Echo "Id=" + CStr(Result(0)) + ",Create_Date=" & FormatDateTime(Result(1), 1)
    Result.MoveNext
Loop

Connection.Close

Install and Create MySQL ODBC Connector on Windows 7

MySQL ODBC Connector help you to connect to MySQL via different applications. It supports Windows, Linux, Mac & Unix Platforms. You can more details from here. Please follow the following steps to download and install MySQL ODBC Connector to your machine.


  • Download and install from here or from here
  • Double click on the file "mysql-connector-odbc-3.51.30-winx64.msi" that you just downloaded to run the setup process.
  • Click Next and accept the license agreement.
  • Select Custom to see what we will have after the installation