krat_vadim
13 years agoOccasional Contributor
work with mysql
hi!
I have local database - Server version: 5.1.28-rc-community MySQL Community Server (GPL)
want to run the sample http://support.smartbear.com/viewarticle/9007/
my JScript
function CreateTable()
{
var Qry = ADO.CreateADOQuery();
Qry.ConnectionString = "Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=my_db;Uid=root;Pwd=root;";
Qry.SQL = "CREATE TABLE "+
"staff2 ("+
"id MEDIUMINT NOT NULL AUTO_INCREMENT, "+
"name CHAR(30) NOT NULL, "+
"age SMALLINT(6) NOT NULL, "+
"salary int(15) NOT NULL, "+
"PRIMARY KEY(id) "+
");"
Qry.ExecSQL();
Qry.Close();
}
on line 'Qry.ExecSQL();'
I have error message
"[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
help me please
I have local database - Server version: 5.1.28-rc-community MySQL Community Server (GPL)
want to run the sample http://support.smartbear.com/viewarticle/9007/
my JScript
function CreateTable()
{
var Qry = ADO.CreateADOQuery();
Qry.ConnectionString = "Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=my_db;Uid=root;Pwd=root;";
Qry.SQL = "CREATE TABLE "+
"staff2 ("+
"id MEDIUMINT NOT NULL AUTO_INCREMENT, "+
"name CHAR(30) NOT NULL, "+
"age SMALLINT(6) NOT NULL, "+
"salary int(15) NOT NULL, "+
"PRIMARY KEY(id) "+
");"
Qry.ExecSQL();
Qry.Close();
}
on line 'Qry.ExecSQL();'
I have error message
"[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
help me please