Whenever I try to connect to MySql using vbscript, I'm getting an error:
Script: E:\VBScript\CreateAccount.vbs
Line: 6
Char: 1
Error:[Microsoft][ODBC Driver Manager] Data source name too long
Code: 80000405
Source Microsoft OLEDB Provider for ODBC drivers
Here's the code to open the connection to Mysql:
dim cn, rs
set cn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.Recordset")
cn.connectionstring = "driver={MySQL ODBC 5.1 Driver}; Data Source=E:\Important\mysql-5.1.39-win32\bin\mysqld;Database=mail; User Id=root; Password = ;"
cn.open
How can I enable vbscript to connect to Mysql?