Re: Basic Qt Sql Question
Do you have a SQLite database file called "deneme" in your current working directory?
Re: Basic Qt Sql Question
thank you for your reply. i didn't have. now changed, but still the same problem.
Re: Basic Qt Sql Question
Try "qry.lastError().text()" @ line 39 in lieu of "db.lastError().text()"
Re: Basic Qt Sql Question
now the error changes like:
Quote:
error = "near "1": syntax error Unable to execute statement"
Re: Basic Qt Sql Question
What wysota was trying to say to you is: You are using the wrong database driver for MySql. This is most probably also the reason why the query throws an error. Not all database systems understand the same SQL commands.
Re: Basic Qt Sql Question
Quote:
Originally Posted by
sidenelen
now the error changes like:
And if you correct the syntax? Does it work then?
Re: Basic Qt Sql Question
Yours SQL query is bad
Code:
SELECT * FROM `tablo` 1
It should be
Code:
SELECT * FROM `tablo`
or
Code:
SELECT * FROM `tablo` WHERE 1
Of course, the latter figure does not make sense.
Re: Basic Qt Sql Question
@Lesiok
Yeah, I corrected the code as you said and it works! Thank you all guys