I migrated from Access
to Mysql.Codes for vb6
.
mobjCmd.CommandText = "INSERT INTO The123 SELECT The1 AS FirstName FROM schedule"
Set mobjRst = mobjCmd.Execute
And this query is not working in Mysql.
您需要为The123
表格指定列
mobjCmd.CommandText = @"INSERT INTO The123 (FirstName) SELECT The1 AS FirstName FROM schedule"
Set mobjRst = mobjCmd.Execute
mobjCmd.CommandText = "INSERT INTO The123 VALUES("yOUR VALUES")"
MOBJCMD.COMMANDTEXT = "SELECT The1 AS FirstName FROM schedule"
Set mobjRst = mobjCmd.Execute
你必须划分两个 CMD