InterviewSolution
| 1. |
Explain Qsqlquery With And Example? |
|
Answer» QSqlQuery CLASS has the functionality to execute and manipulate SQL commands. Both DDL and DML type of SQL QUERIES can be executed. The most important method in the class is exec_(), which takes as an argument a string containing SQL statement to be executed. Example: query = QtSql.QSqlQuery() query.exec_("create table sportsmen(ID int primary KEY, " ";rstname varchar(20), lastname varchar(20))") QSqlQuery class has the functionality to execute and manipulate SQL commands. Both DDL and DML type of SQL queries can be executed. The most important method in the class is exec_(), which takes as an argument a string containing SQL statement to be executed. Example: query = QtSql.QSqlQuery() query.exec_("create table sportsmen(id int primary key, " ";rstname varchar(20), lastname varchar(20))") |
|