Re: [Interest] QSqlQuery bind value

2021-03-17 Thread Jérôme Godbout
Oh, great, thanks for the pointer, will do, good to known. On Mar 16, 2021, at 5:48 PM, Elvis Stansvik mailto:elvst...@gmail.com>> wrote: Yea, you can always use db.driver()->escapeIdentifier(x, QSqlDriver::TableName) if you want to sleep a little better anyway. Elvis Den tis 16 mars 2021

Re: [Interest] QSqlQuery bind value

2021-03-16 Thread Elvis Stansvik
Yea, you can always use db.driver()->escapeIdentifier(x, QSqlDriver::TableName) if you want to sleep a little better anyway. Elvis Den tis 16 mars 2021 kl 21:52 skrev Jérôme Godbout : > > Thanks, that was the problems, this is annoying, but I do create the query > prepare with a String with

Re: [Interest] QSqlQuery bind value

2021-03-16 Thread Jérôme Godbout
Thanks, that was the problems, this is annoying, but I do create the query prepare with a String with arg (I known this is bad, but the tablename is provided by inner code only, this is not user inputs of any sort). On Mar 16, 2021, at 4:23 PM, Elvis Stansvik mailto:elvst...@gmail.com>> wrote:

Re: [Interest] QSqlQuery bind value

2021-03-16 Thread Elvis Stansvik
Den tis 16 mars 2021 kl 21:21 skrev Elvis Stansvik : > > Den tis 16 mars 2021 kl 20:19 skrev Jérôme Godbout : > > > > Hi, > > > > I’m trying to use the Sql with Sqlite with Qt. The database seem to be > > working just fine, but I run into troubles with the bind value. The named > > bind doesn’t

Re: [Interest] QSqlQuery bind value

2021-03-16 Thread Elvis Stansvik
Den tis 16 mars 2021 kl 20:19 skrev Jérôme Godbout : > > Hi, > > I’m trying to use the Sql with Sqlite with Qt. The database seem to be > working just fine, but I run into troubles with the bind value. The named > bind doesn’t seem to work (Qt 5.15.2, Mac OS): > >

[Interest] QSqlQuery bind value

2021-03-16 Thread Jérôme Godbout
Hi, I’m trying to use the Sql with Sqlite with Qt. The database seem to be working just fine, but I run into troubles with the bind value. The named bind doesn’t seem to work (Qt 5.15.2, Mac OS): m_sql->m_create_table(m_database); m_sql->m_create_table.prepare(R"raw(CREATE TABLE IF NOT

Re: [Interest] QSqlQuery... bindValue does not work for CREATE TABLE .... AS SELECT....

2015-03-11 Thread Bernhard
=bernhard-lindner...@qt-project.org] Im Auftrag von Guido Seifert Gesendet: Dienstag, 10. März 2015 20:07 An: interest@qt-project.org Betreff: [Interest] QSqlQuery... bindValue does not work for CREATE TABLE AS SELECT Hi, just 'discovered' that bindValue does not seem to work

Re: [Interest] QSqlQuery... bindValue does not work for CREATE TABLE .... AS SELECT....

2015-03-11 Thread Bernhard
[mailto:interest-bounces+private=bernhard-lindner...@qt-project.org] Im Auftrag von Guido Seifert Gesendet: Mittwoch, 11. März 2015 10:43 An: interest@qt-project.org Betreff: Re: [Interest] QSqlQuery... bindValue does not work for CREATE TABLE AS SELECT Hmm... how are those links supposed

Re: [Interest] QSqlQuery... bindValue does not work for CREATE TABLE .... AS SELECT....

2015-03-11 Thread alexander golks
Am Wed, 11 Mar 2015 10:29:41 +0100 schrieb Guido Seifert warg...@gmx.de: works at my side, qt4.8.6: query.prepare(CREATE TEMP TABLE selectseriestable AS SELECT title FROM titlegroup,title WHERE titlegroup.seriesID=(SELECT seriesid FROM series WHERE series=:series AND

Re: [Interest] QSqlQuery... bindValue does not work for CREATE TABLE .... AS SELECT....

2015-03-11 Thread Guido Seifert
Hmm... how are those links supposed to help me? They are both about QSql::In and QSql::Out and stored procedures. Not applicable to my use case and problem. At least not in a way, which is obvious to me. :-) Guido On Wed, 11 Mar 2015 08:49:36 +0100 Bernhard priv...@bernhard-lindner.de wrote:

Re: [Interest] QSqlQuery... bindValue does not work for CREATE TABLE .... AS SELECT....

2015-03-11 Thread Guido Seifert
works at my side, qt4.8.6: query.prepare(CREATE TEMP TABLE selectseriestable AS SELECT title FROM titlegroup,title WHERE titlegroup.seriesID=(SELECT seriesid FROM series WHERE series=:series AND version=:version) AND titlegroup.titleID=title.titleID;); QString series=bla;

[Interest] QSqlQuery... bindValue does not work for CREATE TABLE .... AS SELECT....

2015-03-10 Thread Guido Seifert
Hi, just 'discovered' that bindValue does not seem to work with CREATE TABLE statements. One could ask, why would anyone want to use a bound value in a CREATE TABLE statement. Here my query: CREATE TEMP TABLE selectseriestable AS SELECT title FROM titlegroup,title WHERE

[Interest] QSqlQuery

2014-01-26 Thread Igor Mironchik
Hi. I have some questions about database support in Qt 5. First of all, is it safe to transfer a QSqlQuery instance from one thread to another to process him in another thread. I.e. I want to execute SELECT query on DB thread and return a QSqlQuery from that thread to the GUI thread, where I

Re: [Interest] QSqlQuery

2014-01-26 Thread arno
Hi Igor, On 26-Jan-14 4:29 PM, Igor Mironchik wrote: I have some questions about database support in Qt 5. First of all, is it safe to transfer a QSqlQuery instance from one thread to another to process him in another thread. I.e. I want to execute SELECT query on DB thread and return a

Re: [Interest] QSqlQuery

2014-01-26 Thread Andre Somers
Igor Mironchik schreef op 26-1-2014 16:29: Hi. I have some questions about database support in Qt 5. First of all, is it safe to transfer a QSqlQuery instance from one thread to another to process him in another thread. I.e. I want to execute SELECT query on DB thread and return a QSqlQuery

Re: [Interest] QSqlQuery

2014-01-26 Thread Igor Mironchik
Hi Igor, On 26-Jan-14 4:29 PM, Igor Mironchik wrote: I have some questions about database support in Qt 5. First of all, is it safe to transfer a QSqlQuery instance from one thread to another to process him in another thread. I.e. I want to execute SELECT query on DB thread and return a

Re: [Interest] QSqlQuery

2014-01-26 Thread Igor Mironchik
Igor Mironchik schreef op 26-1-2014 16:29: Hi. I have some questions about database support in Qt 5. First of all, is it safe to transfer a QSqlQuery instance from one thread to another to process him in another thread. I.e. I want to execute SELECT query on DB thread and return a

Re: [Interest] QSqlQuery

2014-01-26 Thread Thiago Macieira
On domingo, 26 de janeiro de 2014 22:24:58, Igor Mironchik wrote: No, that is not safe. You can use database access from threads, but every thread needs it own QSqlDatabase instance of the database connection. The documentation states: A connection can only be used from within the thread

Re: [Interest] QSqlQuery

2014-01-26 Thread Mark Brand
On 01/26/2014 07:45 PM, arno wrote: Hi Igor, On 26-Jan-14 4:29 PM, Igor Mironchik wrote: I have some questions about database support in Qt 5. First of all, is it safe to transfer a QSqlQuery instance from one thread to another to process him in another thread. I.e. I want to execute

Re: [Interest] QSqlQuery

2014-01-26 Thread Mark Brand
On 01/26/2014 09:24 PM, Igor Mironchik wrote: Igor Mironchik schreef op 26-1-2014 16:29: Hi. I have some questions about database support in Qt 5. First of all, is it safe to transfer a QSqlQuery instance from one thread to another to process him in another thread. I.e. I want to

[Interest] QSqlQuery::value: not positioned on a valid record

2013-12-28 Thread iMath
After setting up a table model like this: code is here [stackoverflow.com] the content is displayed properly, but when I edit the data item then press enter ,this error occurred : QSqlQuery::value: not positioned on a valid record when I close the application and restart it again ,I

[Interest] QSQLQuery bindValue to SELECT WHERE IN

2013-04-09 Thread Witold E Wolski
Trying to bind a value to : SELECT * from features WHERE id IN (:ids) I tried 2 versions: First, build a list with the ids I want to select. Creating a QListQVariant qlist; Second version building a QString (i.e. 1,2,3) Than I bind it to the query above query.bindValue(:ids,qlist); But

Re: [Interest] QSQLQuery bindValue to SELECT WHERE IN

2013-04-09 Thread Richard Moore
On 9 April 2013 16:57, Scott Aron Bloom scott.bl...@onshorecs.com wrote: It will depend the server backend.. However in general, I have never been successful (not just in Qt, at all) in binding for “lists” That's correct, a bound parameter can only hold a single value. There are some evil