Originally Posted by
jfinn88
You are talking about binding my Msg variable correct? the parameter I'm using in my sql statement?
Yes
Originally Posted by
jfinn88
How do I set the conn1 connection since The prepare() fcn only takes one argument can't pass it the connection name with sql statement
You pass the QSqlDatabase handle to the QSqlQuery constructor.
insertQuery.prepare(...);
QSqlQuery insertQuery(m_insertDataBase);
insertQuery.prepare(...);
To copy to clipboard, switch view to plain text mode
Originally Posted by
jfinn88
I will look at documentation on isValid(). How do I only call those methods once when the instance is not valid? little explanation on how this works be great, you got a example?
if (!m_insertDataBase.isValid() {
// addDatabase, setDatabaseName
}
if (!m_insertDataBase.isValid() {
// addDatabase, setDatabaseName
}
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks