Hello!

I'm writing a program in Qt 4.7.4 under Windows 7 with QtCreator. But in the process of writing I met a strange problem: Create view does not work for QSqlQuery.

the source code looks like the following;

QString sql;
QSqlQuery query(mydb); //mydb is defined elsewhere

sql = "Create View SalesCount as SELECT Sales.Year, Count(Sales.ID) AS SalesCount FROM Sales GROUP BY Sales.Year;";
query.prepare(sql);
query.exec();

I am expecting that I can see the view SalesCount in the database (I am using dbForge for mysql). However, I can not see it anywhere. But the same technique works well for tables. So what's wrong here?

I beg for your help.
Sincerely, jason.