Re: [Interest] How to save QTextEdit content by QSqlQuery

2013-01-29 Thread M. Bashir Al-Noimi
On 28/01/2013 08:36 ص, Yves Bailly wrote: Assuming your're using some low-level SQL function and not QSqlQuery and the likes to "build" the SQL command to execute, here's something that works, albeit probably not very efficient: QString html = textEdit->toHtml(); QB

Re: [Interest] How to save QTextEdit content by QSqlQuery

2013-01-27 Thread Yves Bailly
Le 26/01/2013 00:51, M. Bashir Al-Noimi a écrit : > I want to save the content of QTextEdit to the database through QSqlQuery... > how can I do that? > > Running textEdit->toHtml() won't work because the returned string has many > illegal characters to > execute into sql. Assuming your're using

Re: [Interest] How to save QTextEdit content by QSqlQuery

2013-01-26 Thread Mark Brand
Andre Somers wrote: > As long as you use the binding feature of QSqlQuery to put your HTML > in your query, as opposed to trying to build the sting manually, you > should be fine. > > André > Thanks for mentioning this posibility. It didn't occur to me in time for my earlier comment in this

Re: [Interest] How to save QTextEdit content by QSqlQuery

2013-01-26 Thread Andre Somers
Op 26-1-2013 0:51, M. Bashir Al-Noimi schreef: Hi guys, I want to save the content of QTextEdit to the database through QSqlQuery... how can I do that? Running textEdit->toHtml() won't work because the returned string has many illegal characters to execute into sql. As long as you use the bi

Re: [Interest] How to save QTextEdit content by QSqlQuery

2013-01-26 Thread Mark Brand
M. Bashir Al-Noimi wrote: > Hi guys, > > I want to save the content of QTextEdit to the database through > QSqlQuery... how can I do that? > > Running textEdit->toHtml() won't work because the returned string has > many illegal characters to execute into sql. If you are trying to get a string f

Re: [Interest] How to save QTextEdit content by QSqlQuery

2013-01-25 Thread M. Bashir Al-Noimi
On 26/01/2013 01:27 ص, Luis Valdés wrote: Hi, try textEdit->toPlainText(); This will erase all HTML format which I need! On Jan 25, 2013 8:51 PM, "M. Bashir Al-Noimi" wrote: Hi

Re: [Interest] How to save QTextEdit content by QSqlQuery

2013-01-25 Thread Luis Valdés
Hi, try textEdit->toPlainText(); On Jan 25, 2013 8:51 PM, "M. Bashir Al-Noimi" wrote: > Hi guys, > > I want to save the content of QTextEdit to the database through > QSqlQuery... how can I do that? > > Running textEdit->toHtml() won't work because the returned string has many > illegal characte

[Interest] How to save QTextEdit content by QSqlQuery

2013-01-25 Thread M. Bashir Al-Noimi
Hi guys, I want to save the content of QTextEdit to the database through QSqlQuery... how can I do that? Running textEdit->toHtml() won't work because the returned string has many illegal characters to execute into sql. -- Best Regards Muhammad